Skip to content
This repository has been archived by the owner on Jan 1, 2025. It is now read-only.

RecoilJS RecoilRoot not accessible within ThreeJS Canvas #1758

Answered by theronburger
theronburger asked this question in Q&A
Discussion options

You must be logged in to vote

The bridge worked for me. How did you build your bridge?

From @drarmstr :
https://recoiljs.org/docs/api-reference/core/useRecoilBridgeAcrossReactRoots/

If a nested React root is created with ReactDOM.render(), or a nested
custom renderer is used, React will not propagate context state to the
child root. This hook is useful if you would like to "bridge" and
share Recoil state with a nested React root. The hook returns a React
component which you can use instead of in your nested
React root to share the same consistent Recoil store state. As with
any state sharing across React roots, changes may not be perfectly
synchronized in all cases.

So bridging the contexts is a simple as creating a…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@mysticfall
Comment options

Answer selected by theronburger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants