React React.Component – React

  • Initialization that requires DOM nodes should go here.

    • be known
  • If you need to load data from a remote endpoint, this is a good place to instantiate the network request.

    • Why not in constructor?
    • What happens when a component is created with functions and Hooks instead of classes?

This page is auto-translated from /nishio/componentDidMount using DeepL. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I’m very happy to spread my thought to non-Japanese readers.