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 the website.
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.
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. The simple solution would be to call
setTimeout at the start of the task. However, this is not a good solution.
The Gatsby blog starter uses the
dangerouslySetInnerHTML prop to render HTML for blog posts written in Markdown. While this works, there is a better solution.