If you are doing:
useEffect(() => {
duix.subscribe('user', setUser)
}, []);
The setUser function is going to get old in the following render.
We have to find a way to keep it simple, but fix it.
I think we should not create a useDuix(), because the idea is to keep DUIX as a state manager based on events.
If you are doing:
The
setUserfunction is going to get old in the following render.We have to find a way to keep it simple, but fix it.
I think we should not create a
useDuix(), because the idea is to keep DUIX as a state manager based on events.