Are you constantly repeating the same Git command or sequence of commands? Do you wish that it would be faster and easier to type those commands? With Git Aliases you can do it.
In this short blog post, I’ll introduce Git Aliases, show you how to configure them, and give you a list of my commonly used aliases.
Git aliases allow you to reduce the amount of text you write when trying to execute certain commands or a chain of commands. For example, imagine you are doing you are running the push — force-with-lease command. This can get really repetitive…
Are you building an app where you don’t have your backend implementation yet? Are you tired of maintaining a dedicated mock server? Do you find that mocking
axios causes more problems in your tests than it fixes? Then you should probably consider starting using Mock Service Worker (MSW).
Recently, I’ve configured MSW in a couple of projects. Despite MSW being simple to configure there were some scenarios where I had issues. This blog post will do a small introduction to MSW, followed by the base steps while configuring it, and end with some issues I had.
Authentication is hard! Nowadays, to create a simple login or logout feature, we require a considerable amount of boilerplate code. Now picture we want to add authentication with Google or Facebook? More boilerplate, right?
What if I told you that in React you can do that just by wrapping your code with a context provider and by using a custom react hook?
In this blog post, I’ll show you how to add authentication to your React application using the Auth0
useAuth0 custom hook, how to display the authenticated user information, and how to authenticate with a social provider like GitHub.
Hey everyone, I’m making this post to share with you a library that made managing server state on React applications easy and fun — React Query.
In this blog post, I’ll do a small introduction by explaining what led to its creation followed by an introduction to how the
useQuery hook works. I’ll end this post by showing some custom configurations we can do, and how we can do cache invalidation, data refetching, and optimistic updates.
Until now, many React applications have been relying on global state as a way to share data between components and avoid prop drilling.
More than a year has passed since the release of React Hooks. By now, we know all the basics and perhaps have our apps using one or two of them.
This post consists of an agglomerate of tips and pains suffered while trying to migrate from a full-fledged pre Hooks app to a Hooks using one.
At the time it seemed a controversial decision. …
Let’s look at the following anonymous function example called by setTimeout after 1000 milliseconds. Inside of it, we log the hello variable value and the hello property assigned to this.
It would be to expect that the output would be
hello from this. But instead, the output was the following:
Hey everyone, the past week, I struggled with understating some of the insides of React Context. What I wanted to know was — why every time a context variable updates, I get a re-render on my component?
This article consists of the results of my research, as well as the recommended ways to avoid that issue.
For a better understanding of the issue, we will use the following example:
Here, we create a couple of things:
randomStorewhere we create two state variables and an effect that when the
somethingvariable content changes…
This article covers current proposals on Stage 4 with the expected publication year 2020.
Using sticky or global regular expressions that end up having multiple captures groups on a string can be tricky. String.prototype.match doesn’t return capturing groups if the global flag is included, and if it is only the first complete match and it’s capturing groups are returned.
Hey everyone, on the aftermath of the workshop Hooked on Hooks — Playing around with React Hooks, I’ve decided to share a bit of it with you. This article focuses on the motivation that led to creating Hooks following a brief introduction to each of them. This article ends with the rules of Hooks.
A significant part of this article is adapted from the docs, and it doesn’t replace reading them and watching “React Today and Tomorrow, and 90% Cleaner React With Hooks”.
Let’s go back to a life without Hooks. The main pain points focused on three things:
Software Engineer. Nerdy, loves to code and wants to learn everything.