How to access to router context in component ? #5301
Unanswered
abdulazizkhatamov
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
currently, i am using sending request to get session data 2 times, instead is it possible to get session data from router context in my navbar component without using useSession again in my case ? I have tried many ways but please let me know if there is any perfect way to handle it.
My repo: https://github.com/abdulazizkhatamov/miyabi-customer-reactjs
Here is my useSession hook for querying session data from backend:
here is my router provider.tsx:
routes/__root.tsx:
navbar.tsx (this is where i want to access to session data)
Beta Was this translation helpful? Give feedback.
All reactions