Open
Description
See Introduction to Refs in React 16.3
Prior to React v16.3 the callback ref were the preferred way to create and use refs. [...]
If you use an inline callback function for your ref a new function is created for every re-render. This is the case with any arrow function inside the render method.
The inline callback function will also be called twice during updates. [...] the first call produces a null value before the element is return on the second call.