INTRODUCTION The useEffect hook in the world of React's functional components operates as a componentDidMount, componentDidUpdate and componentWillUnmount - all in one. But what if you only wanted to trigger one of the effects at a time. How would you accomplish this? Before we dive into it, let's understand a little more about how the … Continue reading React Tricks: Customizing your useEffect to run ONLY when you want!
I recently completed 2 courses on Svelte and Sapper — one by Rich Harris on Frontend Masters and another on Udemy. I built a mini project using Svelte and recreated it in Sapper — here are my first thoughts. What I loved Syntax — the syntax is soooo much leaner! There’s very little boiler plate … Continue reading Svelte and Sapper — Initial thoughts after a course by Rich Harris (the creator of Svelte) and a mini project
Maintaining immutability when dealing with objects and arrays is very important in React. It ensures that the DOM updates correctly and predictably. But when we have nested data structures, maintaining immutability in our data can get ugly, very fast. This article explores 3 approaches to immutability — doing it natively, using ImmutableJS (a library which … Continue reading Native vs ImmutableJS vs Immer — Are libraries the way to go for immutability in React?