TanStackT
TanStack2y ago
16 replies
rubber-blue

How to get router context in component?

Hi I have a isAuthenticated value in my router context, but I want to render either Component 1 or Component 2 based on whether we are logged in. How can I do this? I'm new to react so any help would be appreciated thank you!
Was this page helpful?