after introducing hooks this part is misleading, as converting into class is no longer the only option, that can be used if state needed for the component
You should convert the component to a class if you need a ref to it, just like you do when you need lifecycle methods or state.
after introducing hooks this part is misleading, as converting into class is no longer the only option, that can be used if state needed for the component
https://github.com/reactjs/reactjs.org/blob/aada3a308493614b7d5b4b438b5c345d7ecc6c53/content/docs/refs-and-the-dom.md#refs-and-function-components-refs-and-function-components