T
TanStack3y ago
eastern-cyan

Navigating from loader

Is there any way to navigate from route's loader function? useNavigate can't be used outside of react components and importing router would cause a circular dependency.
2 Replies
absent-sapphire
absent-sapphire3y ago
You can “throw redirect(…)” Import redirect from the router
eastern-cyan
eastern-cyanOP3y ago
Oh great, thanks!

Did you find this page helpful?