2

An "Uncontrolled Component" keeps the "source of truth" in the DOM. So that puts it outside of the Virtual DOM world. For these Components React will only do the initial render once then ignore it.

If a class with has shouldComponentUpdate() set to false then React too, will only do the initial renders then ignore it.

So if a class that has shouldComponentUpdate() explicitly set to false does that technically make it a Uncontrolled Component?

Shubham Khatri
  • 270,417
  • 55
  • 406
  • 400
garrettmac
  • 8,417
  • 3
  • 41
  • 60

0 Answers0