4 ms·
How can this be integrated with react-query and react-location? Seems that it's tightly coupled to their variants (SWR and react-router). React Query is IMO a
by baxuz 5y ago
How can this be integrated with react-query and react-location?
Seems that it's tightly coupled to their variants (SWR and react-router).
React Query is IMO a must-have on any project that already warrants using React (and that isn't an offline-only app of course).
- bern4444 5y agoI think the goal here is to avoid needing something like react query. The loader functions you write execute on the server and pull data that is needed by the component. You can of course still use react query/swr/redux tool kit etc if you want. Remix doesn't limit what you can do and still fully supports any of these and other client side tools. Remix just encourages to make better use of server side code instead of shoveling everything into the client.
- dimitrisnl 5y agoOff-topic, but I disagree about React-query being a must-have. Putting the fetching responsibility into the components makes a lot of sense in a some projects, but not always. There have been many times where I wish I just went with RxJS to orchestrate the data flow instead.