Skip to content

Hi need help with an error i got with Zustand/React/Vite -> useEffect must not return anything besides a function #2644

Closed Answered by dbritto-dev
eitai asked this question in General
Discussion options

You must be logged in to vote

@eitai in that case the error is not related to zustand but the code itself. As far I see in the compiled version you are returning an object in your useEffect statement which is wrong.

Note: you can only return functions or undefined in useEffect statements

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@eitai
Comment options

@dbritto-dev
Comment options

Answer selected by dbritto-dev
@eitai
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants