Pablo GarciaGit — 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…2 min read·Feb 8, 2023----
Pablo GarciaNpm workspaces using TypeScriptIf having a monorepo wasn’t complicated enough, trying to share code between multiple packages inside the monorepo usually becomes a battle…4 min read·Sep 11, 2022--1--1
Pablo GarciainDev 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…6 min read·Aug 2, 2022--1--1
Pablo GarciaModern JavaScript Decorator PatternMost of the JavaScript examples of the Decorator Pattern out there are either too complex or disappointingly simple. Almost everything is…4 min read·Aug 1, 2022----
Pablo GarciaJavaScript 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…3 min read·Jul 25, 2022----
Pablo GarciaUser-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…5 min read·Jul 16, 2022----
Pablo GarciaReact simple polling custom hook usePollingEffect.A remarkably simple polling function can be implemented with React hooks.2 min read·Apr 15, 2022--2--2
Pablo GarciaMedia 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…2 min read·Mar 30, 2022----
Pablo GarciaReactJS 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…2 min read·Mar 30, 2022--1--1
Pablo GarciaUseful Git CommandsThis is my personal “uncommon but very useful git commands” cheat sheet. I use the command line constantly and I prefer not to use aliases…3 min read·Mar 24, 2022----