Next.js Discord

Discord Forum

Next.js + Zustand error

Unanswered
Yellow and black potter wasp posted this in #help-forum
Open in Discord
Yellow and black potter waspOP
Hello, I am using Zustand for state management but seem to be encountering an issue. I get this error (pic rel) when calling a function from my store in one of my components. I'm not sure if it has to do specifically with HRM but I'd like to be able to continue testing with HRM enabled. The Zustand function makes an API call to my database for some product information, which my component is then trying to display. I call the function in a useEffect hook as well however I get this error implying that two things are trying to update at the same time - any idea what the fix could be? I can provide code snippets if needed in additional posts!

2 Replies

Yellow and black potter waspOP
Relevant code:
Zustand store: