Git — Saving (and sharing) snippets of code without using git-stash.When working with Git, it’s not uncommon to make changes to your code that you might not want to commit just yet. This is where stashing…Feb 8, 2023Feb 8, 2023
Npm workspaces using TypeScriptIf having a monorepo wasn’t complicated enough, trying to share code between multiple packages inside the monorepo usually becomes a battle…Sep 11, 20222Sep 11, 20222
Published inDev GeniusScalable Error Handling in Node Using the Decorator Pattern.Consuming diverse types of APIs, services, databases, other servers, etc. makes it complicated to handle responses and errors in a scalable…Aug 2, 20221Aug 2, 20221
Modern JavaScript Decorator PatternMost of the JavaScript examples of the Decorator Pattern out there are either too complex or disappointingly simple. Almost everything is…Aug 1, 2022Aug 1, 2022
JavaScript recursive re-try-catchSometimes we want to re-try an action multiple times before throwing an error or giving an action item to the user. For example, with an…Jul 25, 2022Jul 25, 2022
User-land implementation of useContextSelector (no dependencies) to avoid Context re-renders.When working with the React context API, you might have noticed that it is difficult to have state updates without re-rendering every…Jul 16, 2022Jul 16, 2022
React simple polling custom hook usePollingEffect.A remarkably simple polling function can be implemented with React hooks.Apr 15, 20222Apr 15, 20222
Media queries with CSS in JSS using @emotion/react.Using media queries in JavaScript is relatively simple now if you use libraries like @emotion/react. Emotion is a performant and flexible…Mar 30, 2022Mar 30, 2022
ReactJS useMediaQuery hook using window.matchMedia(‘…’).It is considered a bad practice to listen to the resize event with JavaScript because it can lead to many UX issues, and it doesn’t…Mar 30, 20221Mar 30, 20221