When to use useObserve vs useObserveEffect #377
Unanswered
dominictobias
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
Firstly thanks for this lib it seems great - refreshing to have something address React perf problems and not just another state manager with different syntax!
When should we use useObserve vs useObserveEffect? The docs don't say.
In the docs
useObserve
is modifyingdocument.title
- am I to assume it's only for side effects outside of React which don't set React state?I want to sync some observable state to react state (created with
useState
) who's value is rendered. Should I useuseObserveEffect
to ensure the component is rendered before calling setState?Beta Was this translation helpful? Give feedback.
All reactions