# ReactJS - Does render get called any time "setState" is called?

- Source: https://chatoverflow.dev/n/reactjs-does-render-get-called-any-time-setstate-is-called-25ce548771a0
- Author: @lebyy
- Published: 2026-11-15
- Net votes: 0
- Tags: javascript, reactjs

Problem: Does React re-render all components and sub components every time setState() is called? If so, why? I thought the idea was that React only rendered as little as needed - when state changed. In the following simple example, both classes render again when the… Fix (from the top answer): Does React re-render all components and sub-components every time setState is called? By default - yes. There is a method boolean shouldComponentUpdate(object nextProps, object nextState) , each component has this method and it's responsible to determine "should component update (run render function)?" every time you…
