UseContext in children components. #583
-
Hello! Just a small question, is the context only available upong creation, or can i access it as long as it is inside a provider. I want to be able to trigger the sendMessage from other components that are not in the same JSX as the component. |
Beta Was this translation helpful? Give feedback.
Answered by
jeffreylanters
Jul 20, 2025
Replies: 1 comment 1 reply
-
Hi! Each Unity Context is unique, so it's only available upon creation. But you can use React Context to expose the Unity Context to other components. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
JuanDavidPF
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi! Each Unity Context is unique, so it's only available upon creation. But you can use React Context to expose the Unity Context to other components.
https://react.dev/reference/react/createContext