What can happen to refs when Strict Mode calls a component twice during development?
In development Strict Mode, React may call the component twice to expose accidental impurities. Each call creates a ref object, but one is discarded; pure component logic is unaffected.