Pablo Garcia·Feb 8, 2023Git — 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…
Pablo Garcia·Sep 11, 2022Npm workspaces using TypeScriptIf having a monorepo wasn’t complicated enough, trying to share code between multiple packages inside the monorepo usually becomes a battle…A response icon2A response icon2
InDev GeniusbyPablo Garcia·Aug 2, 2022Scalable 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…A response icon1A response icon1
Pablo Garcia·Aug 1, 2022Modern JavaScript Decorator PatternMost of the JavaScript examples of the Decorator Pattern out there are either too complex or disappointingly simple. Almost everything is…
Pablo Garcia·Jul 25, 2022JavaScript 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…
Pablo Garcia·Jul 16, 2022User-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…
Pablo Garcia·Apr 15, 2022React simple polling custom hook usePollingEffect.A remarkably simple polling function can be implemented with React hooks.A response icon2A response icon2
Pablo Garcia·Mar 30, 2022Media 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…
Pablo Garcia·Mar 30, 2022ReactJS 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…A response icon1A response icon1