flâneur — a map of the web's best reading

Keeping Components Pure – React

react.dev · 2,074 words · saved by 1 readers

The library for web and native user interfaces

Learn React Describing the UI Copy page Copy Keeping Components Pure Some JavaScript functions are pure. Pure functions only perform a calculation and nothing more. By strictly only writing your components as pure functions, you can avoid an entire class of baffling bugs and unpredictable behavior as your codebase grows. To get these benefits, though, there are a few rules you must follow. You will learn What purity is and how it helps you avoid bugs How to keep components pure by keeping changes out of the render phase How to use Strict Mode to find mistakes in your components Purity: Compone

Explore this link on the map →

related reading