react-router
react-router copied to clipboard
[Docs]: Improve documentation about what invokes loaders
Describe what's incorrect/missing in the documentation
There seems to be quite a bit of confusion about when and what exactly invokes the loaders in a react-router 6.4+ application. Many people seem to assume that it is the RouterProvider that invokes the loaders. However, it is createBrowserRouter which kicks off the loaders (as far as I understand it at least). I think this could be improved in the documentation so that it is easier to understand how to setup react-router with for example mock service worker and similar tools.
See this issue in the msw Github repo for context: https://github.com/mswjs/msw/issues/1653