Search code examples
reactjscomponentsrenderlifecycle

React rendering everytime state changes


That is the way react works right?, is it bad on large scale application? When would I want it not to render on every state change, and how is it done?

(Using function components)


Solution

  • The best way to handle your state is by using a State container like Redux or useContext from react you can find more informations here : React-redux : https://react-redux.js.org/introduction/getting-started UseContext : https://www.w3schools.com/react/react_usecontext.asp