Good post by Lachlan Young with a simple use case for using createRef (Class Components) and useRef (Function Components): focusing an external component (here: TextField from Material UI) when your own parent component mounts. I especially like the final thoughts at the end of the post: If you had no need for a ref besides …
Continue reading “React Refs, both Class and Function Components”