The coding articles collection contains curated stories, tips, questions and answers on a wide variety of topics. The main focus of these articles revolves around the languages and technologies presented in snippets, as well as career advice and lessons.
Avoid unnecessary re-runs by using primitive dependencies in your React effect.
React, Hooks · Jun 12, 2022
Testing React components that use portals can be difficult until you understand what you really need to be testing.
React, Testing · Mar 13, 2022
When working with multiple useState
hooks in React, things can get a bit complicated while debugging. Luckily, there's an easy way to label these values.
React, Hooks · Nov 7, 2021
Wrapping your mind around React hooks and how they interact with setInterval()
can be difficult. Here's a guide to get you started.
React, Hooks · Sep 28, 2021
When working with state in your code, you often run into issues with maintaining complexity and readability. Oftentimes, these issues are easily fixable.
React, Logic · Jun 12, 2021
Learn the differences between PropTypes.objectOf()
and PropTypes.shape()
and where to use each one with this quick guide.
React, Components · Jun 12, 2021
When developing React components, you might often need to conditionally apply a className. Learn how to handle empty classNames correctly using this handy tip.
React, Components · Nov 7, 2021
Learn of all the different ways to set the value of a selected input in React with this quick guide.
React, Components · Jun 12, 2021
Testing React components that update asynchronously with React Testing Library is a common scenario. Learn how to deal with common issues and speed up your testing.
React, Testing · Nov 7, 2021
Testing Redux-connected components with React Testing Library is a very common scenario. Learn how to use this simple utility function to speed up your testing.
React, Testing · Nov 7, 2021
Take a deeper dive into React's rendering process and understand the basics behind the popular JavaScript framework.
React, Render · Jun 12, 2021
Take a deeper dive into React's rendering process and understand how to make small yet powerful tweaks to optimize performance.
React, Render · Jun 12, 2021
Take a deeper dive into React's rendering process and understand the role of the Context API and Redux in it.
React, Render · Jun 12, 2021
As powerful as React is, it is also quite fragile at places. Did you know that just a few lines are more than enough to break your entire React application?
React, Debugging · Nov 6, 2021
Testing stateful React components is by no means a difficult task, but did you know there is an elegant solution that doesn't involve testing state directly?
React, Testing · Jun 12, 2021