A reminder that side projects can both be fun and productive
Building side projects is a lot of fun. Few feelings rival that of sitting in front of your chosen code editor, your favourite beverage or snack in hand and an idea buzzing around in your head. Being productive with side projects is a challenging thing. Over the last few months I have been hacking away at one and whilst it has improved my understanding of some frontend concepts, I recently realised it was not translating into patterns and knowledge I could implement immediately at work. This is because the…
Have you ever read the source code of a popular library and come across comments which explain what the code is doing? Sometimes the explanation given is straightforward but other times it leaves you scratching your head. I had one such moment recently and after much head scratching, it left me with a deeper appreciation of the effort that goes into open source tools and inspired me to write this post.
I came across the code in question whilst investigating how frontend frameworks attach event handlers to DOM elements. Over the last few months, I have been rebuilding different parts…
ReactDOM is an object which exposes a number of top-level APIs to interact with the browser DOM. According to the docs, it provides ‘DOM-specific methods that can be used at the top level of your app and as an escape hatch to get outside of the React model if you need to’. One of those methods is render()
.
Before going further, it is worth having a general understanding of React’s internal workings. In React 15, updates were done in a synchronous manner. This created the risk of updates running slower than the 16ms (1000 milliseconds / 60 frames per…