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.
React, Hooks
Avoid unnecessary re-runs by using primitive dependencies in your React effect.
React, Testing
Testing React components that use portals can be difficult until you understand what you really need to be testing.
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
Wrapping your mind around React hooks and how they interact with setInterval()
can be difficult. Here's a guide to get you started.
React, Logic
When working with state in your code, you often run into issues with maintaining complexity and readability. Oftentimes, these issues are easily fixable.
React, Components
Learn the differences between PropTypes.objectOf()
and PropTypes.shape()
and where to use each one with this quick guide.
React, Components
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
Learn of all the different ways to set the value of a selected input in React with this quick guide.
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.
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, Render
Take a deeper dive into React's rendering process and understand the basics behind the popular JavaScript framework.
React, Render
Take a deeper dive into React's rendering process and understand how to make small yet powerful tweaks to optimize performance.
React, Render
Take a deeper dive into React's rendering process and understand the role of the Context API and Redux in it.
React, Debugging
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, Testing
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?