remix-run / remix

Build Better Websites. Create modern, resilient user experiences with web fundamentals.
https://remix.run
MIT License
30.09k stars 2.54k forks source link

🗺️ Middleware #7643

Open ryanflorence opened 1 year ago

ryanflorence commented 1 year ago
knownasilya commented 8 months ago

What's the status on this? Specifically asking for ReactRouter because the root loader doesn't run first there and it seems like everyone using ReactRouter (personally as a stepping stone to Remix) is floundering (see https://github.com/remix-run/react-router/discussions/9327) on how to do authentication.

nilansaha commented 1 month ago

Is there any update on this? Authentication is probably the biggest use case.

chasoft commented 1 month ago

My approach for this is:

However, I'm unable to find unstable_dataStrategy in version 7.

infiniteluke commented 4 weeks ago

@chasoft https://reactrouter.com/en/main/routers/create-browser-router#middleware

jrmyio commented 3 weeks ago

@chasoft https://reactrouter.com/en/main/routers/create-browser-router#middleware

We do still need a way to be able to change dataStrategy using RR7 vite plugin though.

chinanderm commented 1 week ago

@infiniteluke Using the new routes.ts pattern, there is nothing similar to RRv6 handle to set up middleware.