3 ms·
Global objects in react are almost universally an anti pattern. The only way to do them right is through a context, ensuring the state lives in the context. But
by dclowd9901 3y ago
Global objects in react are almost universally an anti pattern. The only way to do them right is through a context, ensuring the state lives in the context. But most people hate writing the scaffolding, so a non reactive, non FP singleton gets to work and fails at integrating correctly with the react ecosphere.