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•4y ago
I responded there.
national-goldOP•4y 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 loadersnational-goldOP•4y 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•4y ago
This channel is for TanStack Router (currently known as react-location)
deep-jade•4y 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•4y ago
I assumed that link was to React Location, not React Router. I've updated my original comments in the discussion.
national-goldOP•4y ago
it might be worth migrating to react-location then
deep-jade•4y ago
I would hold off for TanStack Router
Which is going to be react-location, but on crack
national-goldOP•4y ago
I just installed it and loader does no exist, so yea something is off with it atm
national-goldOP•4y ago

deep-jade•4y ago
Doesn't look like your routes array is typed correctly for auto complete
national-goldOP•4y ago
ah, yea I'm not sure I can hold off, I need some sort of router lol
deep-jade•4y ago
Location will be just fine then.
It's plenty stable and production tested. Just doesn't have all of the typescript goodies