4.4.1 version throws an error "Cannot read properties of null (reading 'useRef')" #1983
Replies: 10 comments 15 replies
-
Is it specific to 4.4.1? |
Beta Was this translation helpful? Give feedback.
-
Is there a fix for this issue? I experience it with zustand 4.4.1 and react 18.0.2 |
Beta Was this translation helpful? Give feedback.
-
I continue to encounter this error in React 18.2.0 and Zustand 4.4.7. Is there a solution available ? |
Beta Was this translation helpful? Give feedback.
-
I encountered this error while working outside a React component, if this is the case for someone reading this, try with this section of the official docs as accessing store the normal way outside a component will render this error. if this is not your case, hope someone can drop another solution for ya <3 |
Beta Was this translation helpful? Give feedback.
-
I get this:
|
Beta Was this translation helpful? Give feedback.
-
I'm experiencing this in a react-native app inside an npm workspace. |
Beta Was this translation helpful? Give feedback.
-
I need someone to help investigation this.
|
Beta Was this translation helpful? Give feedback.
-
Hello everyone! Unfortunately, I can still reproduce this error on versions I encountered this error when I wanted to update a project from react-native version 0.71.18 to version 0.74.5 I've tried to create a new project in my app folder and also adjust the old one to the new requirements. |
Beta Was this translation helpful? Give feedback.
-
Hi everyone! I may have found a solution (that helped me at least): I simply removed react and react-dom libraries from the package.json file of the react-native app, but left it in the main monorepo. |
Beta Was this translation helpful? Give feedback.
-
This occurred in my project where I ran npm update before installing zustand and migrating my project to zustand. Removing my node_modules and package-lock then restinalling has resolved the issue for my small project on my end. Everything was fun until I decided to utilize the I'm currently on: I am not using react-native. Hope this info provides a bit more insight. |
Beta Was this translation helpful? Give feedback.
-
react: 18.2.18
react-dom: 18.2.7
zustand: 4.4.1
Beta Was this translation helpful? Give feedback.
All reactions