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
related reading
- You Might Not Need an Effect – Reactreact.dev
- Blogged Answers: A (Mostly) Complete Guide to React Rendering Behavior · Mark's Dev Blogblog.isquaredsoftware.com
- Why React Re-Renders • Josh W. Comeaujoshwcomeau.com
- Rules of React – Reactreact.dev
- Pure components in React: Using PureComponent and React.memo - LogRocket Blogblog.logrocket.com
- The Interactive Guide to Rendering in Reactui.dev
- Tutorial: Tic-Tac-Toe – Reactreactjs.org
- Understanding useMemo and useCallback • Josh W. Comeaujoshwcomeau.com
- Building Bulletproof React Components - Shu Dingshud.in
- When does React re-render components? | Felix Gerschaufelixgerschau.com
- Tao of React - Software Design, Architecture & Best Practices | Alex Kondovalexkondov.com
- React graph viscrubier.github.io