T
TanStack4y ago
national-gold

Authenticated loaders

GitHub
Authenticated loaders · Discussion #9327 · remix-run/react-router
It's my understanding that all matched loaders are fetched in parallel. Is there a best practice for solving the problem that we only want to execute certain loaders if a user is authenticated?
14 Replies
deep-jade
deep-jade4y ago
I responded there.
national-gold
national-goldOP4y ago
I think I've read your replay like 20 times now Do you happen to have an example? I wasn;t able to get this working yet @Tanner Linsley or maybe a hint on how Sub loaders can wait on the promises of parent loaders
national-gold
national-goldOP4y ago
so I don't have parentMatch "react-router-dom": "6.4.0", , I was looking at these documents https://reactrouter.com/en/main/start/overview am I on the wrong version or something?
deep-jade
deep-jade4y ago
This channel is for TanStack Router (currently known as react-location)
deep-jade
deep-jade4y ago
React Router support can be found here: https://github.com/remix-run/react-router/discussions
GitHub
Discussions · remix-run/react-router
Declarative routing for React. Contribute to remix-run/react-router development by creating an account on GitHub.
deep-jade
deep-jade4y ago
I assumed that link was to React Location, not React Router. I've updated my original comments in the discussion.
national-gold
national-goldOP4y ago
it might be worth migrating to react-location then
deep-jade
deep-jade4y ago
I would hold off for TanStack Router Which is going to be react-location, but on crack
national-gold
national-goldOP4y ago
I just installed it and loader does no exist, so yea something is off with it atm
national-gold
national-goldOP4y ago
No description
deep-jade
deep-jade4y ago
Doesn't look like your routes array is typed correctly for auto complete
national-gold
national-goldOP4y ago
ah, yea I'm not sure I can hold off, I need some sort of router lol
deep-jade
deep-jade4y ago
Location will be just fine then. It's plenty stable and production tested. Just doesn't have all of the typescript goodies

Did you find this page helpful?