Replies: 2 comments 1 reply
-
You probably want to use subscribe+useState. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I am puzzled, I can't use |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I must probably misunderstand the usage of
subscribe
but I want to return from it. I am usingsubscribe
outside React, more precisely, in a route of Universal-Router). Whenever the proxied state changes, I want to capture the state change to pass the updated state as a prop to a React component to render.Note that Universal-Router needs to return a React component.
Something like:
I cannot pass the
return Home({selected})
insidesubscribe
nor can return.Alternatively, I firstly tried to use
useSnapshot
inside the componennt that sets the "selections" and renders the "selected" items but I have this nice message :)What could be the alternatives?
Beta Was this translation helpful? Give feedback.
All reactions