What Fired My useEffect?Developing in React brings its set of challenges, especially when dealing with side effects in functional components. React’s useEffect hook is a powerful tool for handling side effects, but it can sometimes be a mystery figuring out which dependency...Apr 4, 2024·2 min read·17
React Performance: useState Lazy InitializationWhenever you need to set the initial value of the state from a function that returns a value (see below), the function will get called at every re-render even though we only need it during the initial render. const initialState = caluclateValue(props...Aug 12, 2022·1 min read·4
Deep Work by Cal NewportSome author-defined terms- Deep Work: “Professional activities performed in a state of distraction-free concentration that pushes your cognitive capabilities to their limit. These efforts create new value, improve your skill, and are hard to replicat...Aug 8, 2022·12 min read·10
Generator Functions in JavaScript: A Simple GuidePhoto by Pankaj Patel on Unsplash General JavaScript functions can’t be interrupted in the middle of function execution, that is, there is no interruption from the time the function is invoked until function execution completes. When we want to execu...Jul 6, 2022·2 min read·5
How to Add Disqus to Gatsby BlogA short guide on how you can add Disqus to your Gatsby blog. Ever since reviving my blog I have been planning to add a discussion forum of sorts to it as well. Found Disqus as the right choice for now, although I would have gone for an open sourced a...Jul 1, 2022·2 min read·9
TIL : Git WorktreeA git repository can support multiple working trees, allowing you to check out more than one branch at a time. With git worktree you can add a new working tree that is associated with the repository, along with additional metadata that differentiates...Jun 4, 2022·1 min read·3
TIL : Generator FunctionsGeneral JavaScript functions can’t be interrupted in the middle of a function execution, once the function is invoked until function execution completes. When we want to execute functions which can be interrupted or which can execute after a while on...Apr 5, 2022·3 min read·9