Michal Miškerník

I am the tech lead at Toggl Hire. My main areas of expertise are JavaScript, React, Redux, and all the things related to that. I have experience with successfully building a SaaS startup while navigating around iterations and pivots. This blog is a collection of various interesting problems I have solved.

Recent posts

Showing Vercel region to visitors

Posted on 30 July, 2020

I wanted to add a note at the bottom of this site to say that it is hosted with Vercel. One of their main features is the edge network, meaning this website is served from multiple regions. I thought it would be interesting to also show the exact region each visitor is connecting to when visiting…

Generating PDFs and images from React components

Posted on 10 June, 2020

Let's say that we have a React element that we would like to save as a PDF document or an image. In order to do that, we can use Puppeteer, which uses a headless instance of the Chromium browser and is able to generate PDFs and images, using the and functions. We don't need to run the whole React…

Reliable timeouts in React apps

Posted on 03 August, 2019

Let's say your React app presents the user with a task that has a time limit. The user must submit the task before the time runs out, otherwise the app will submit the task automatically. The simple solution would be to call at the appropriate moment, probably when the user starts the task. The app…

Rendering HTML in Gatsby

Posted on 16 December, 2018

The Gatsby blog starter uses the prop to render HTML for blog posts written in Markdown. While this works, there is a better solution. Along with the property of each blog post, there is the property which contains the AST (abstract syntax tree) of the rendered markdown document. For example, the…

Served by Vercel