oedotme / generouted

Generated file-based routes for Vite
https://stackblitz.com/github.com/oedotme/generouted/tree/main/explorer
MIT License
1.02k stars 47 forks source link

Feature: Support React Query in React Router #140

Closed gunta closed 9 months ago

gunta commented 9 months ago

Or optionally:

oedotme commented 9 months ago

@gunta AFAIK there's nothing special needed for supporting React Query with React Router through generouted.

Here's an article about React Query + React Router covering prefetch and invalidation through action and loader functions which you can use at generouted by exporting route-based Action/Loader function.

Also you could add a custom routes.tsx to modify and/or configure more exports, see #103.

Hope that helps.