Member-only story

Deep Dive Into React Effects In 2023

Sebastian Carlos
17 min readJan 10, 2023

--

Of all the React topics that could use a refresh, the docs on useEffect probably needed it the most. The new docs are an amazing achievement, and it is my pleasure to guide you through all I learned from them.

Effects are an advanced topic. This guide hopes to hold a helping hand while pulling no punches.

If you’re new to React, I’d recommend reading the official Quick Start guide first. If you’re already familiar with React and just need a refresher on useEffect for the new year, buckle up! You’re in for a wild ride.

Effects are the second-to-last concept introduced in the new docs.

When React Hooks were first released on February 2019, a lot of attention was put on the useEffect hook. That made sense at the time because useEffect was the point of contact between the new hooks paradigm and the familiar concept of the “component lifecycle.”

However, the over-reliance on useEffect and the lack of best practices at the time led to an avalanche of problems. In short, every single React dev is scarred for life from reading unmaintainable piles of Effects.

By putting Effects at the end of the docs, the React team aims to fix things and subdue the excessive use and glorification of Effects.

--

--

Sebastian Carlos
Sebastian Carlos

No responses yet