Read about "react"
Testing with a Custom Render
January 13, 2021It's been quite some time for me using @testing-library/react that I can already get a sense of what's right to do and what's not. If you have used RTL before, you probably know that it exposes a render method. import { render } from '@testing-library/react' This method takes... Read more →
React Testing Setup
September 6, 2020Testing your code is like having a lifesaver, everyone should have one. Here, I'm going to set up an environment of safety, one that will you the confidence you need to ship your React code in the best shape possible. > Let's assume you already have your React project setup and... Read more →
Refactor your Gatsby website to use Typescript
February 2, 2020If you are a big fan of Typescript (like me 🙋♂️), and you have a Gatsby website, then you are in the right place. Here, I want to show you how to refactor your Gastby website to use Typescript. If you just want to see code, it's fair. Here is the change I made for this websi... Read more →
Avoiding complexity with Compound Components
December 3, 2019Over the years, the way we consume and create our React Components have changed considerably. I'm pretty sure, at some point this thought got on your mind when creating a component. > I'm going to create this generic component that we will reuse. And then as you add features t... Read more →
Use media queries with React hooks
November 24, 2019Using media queries with React is pretty easy nowadays. There are a lot of solutions out there, but the most popular one is react-media by the ReactTraining people. But today everyone wants to use hooks, so I'm going to show you how to recreate some of the react-media (they do... Read more →
How to break the rules, with conditional hooks
November 22, 2019If you have been working with hooks for a while now, you probably know there are some rules around it. One of them is, hooks cannot be conditional or called inside loops, neither inside nested functions. They need to be on the top level function scope. In this post, I'm going t... Read more →
Route to Next.js
November 15, 2019Tell me this never happen. You have a new idea of project, and then you start coding straight away. You need all sorts of things, Server Side Rendering because you want Google to pick up your content. Also, you want it to be fast, so you start to code split code, dealing with we... Read more →
useEffect and useLayoutEffect
October 28, 2019From React's 16.8 release, there has been quite a change in the way we use to write React components. In this version, the React team introduced Hooks, allowing you to share your component logic and not write a single class anymore. People reacted very well to this change and st... Read more →
React performance with CSS
October 9, 2019There are a lot of different ways to do CSS with React, and the library itself is not opinionated on how you do so, instead, it’s you, the developer, who decides what to use. Reality is, that if you look for “Stying a React App” in google, it will come up with hundreds of artic... Read more →