A ref created with React.createRef can quietly stay null in a class component, with no error and no warning. I ran into one case where that happens, and it was subtle enough that I proposed a note for the official React docs.
๐ Continue reading on my blog: ๐ Don't return early from React.Component when using React.createRef
Top comments (0)