How to get current route context from another hook? #13532
Unanswered
davidbielik
asked this question in
Q&A
Replies: 1 comment
-
That context is only for loaders and actions, it's different than React context, if you want to access the value outside them like in your UI return the data from a loader and then access it from there. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When using
unstable_createContext
, I am setting context in my loaders:Questions
context
from outside loaders?For example, I have a function
useFeatures
- what hook can I use to access thefeaturesContext
I created?Thanks - I can submit a PR to update the docs based on these answers!
Beta Was this translation helpful? Give feedback.
All reactions