0

Let's say I've triggered an update of a single React component & as we know by default it will trigger the update of all it's children components.

BUT

  • How does it work in combination with browser's reflow/repaint ?
  • How does the whole process look like (step by step) after we trigger a single React-component's update?
Johnexe
  • 83
  • 1
  • 9

1 Answers1

0

By default, the child components would be updated as well, however, that only happens in the virtualDOM, and not the actual DOM. Changes are made to the virtualDOM, React then checks to see which DOM elements/components are changed/updated, and only those are updated in the actual DOM, it's part of the reason why your React app is fast.

You can refer to this thread for more information, though I think they are more so on class component, not functional component.

Hal
  • 26
  • 2