You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current system for handling search parameters in Remix is not as efficient as it could be. This leads to unnecessary refetches of loaders that do not access search parameters, causing stale data and decreased performance.
Goal
The goal of this feature request is to optimize the handling of search parameters, so that only loaders that need specific search parameters are reloaded, thus increasing performance. It is also important to avoid stale data!
Idea
The idea behind this feature request is to give developers more control over the search parameters used by each loader. This can be achieved by allowing developers to specify which search parameters are needed by each loader. Then, the search parameters will be passed as an argument in the loader/action args to force the user to define the needed search params and prevent stale state.
Implementation
One possible solution would be to export the needed search params from the module.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
The current system for handling search parameters in Remix is not as efficient as it could be. This leads to unnecessary refetches of loaders that do not access search parameters, causing stale data and decreased performance.
Goal
The goal of this feature request is to optimize the handling of search parameters, so that only loaders that need specific search parameters are reloaded, thus increasing performance. It is also important to avoid stale data!
Idea
The idea behind this feature request is to give developers more control over the search parameters used by each loader. This can be achieved by allowing developers to specify which search parameters are needed by each loader. Then, the search parameters will be passed as an argument in the loader/action args to force the user to define the needed search params and prevent stale state.
Implementation
One possible solution would be to export the needed search params from the module.
To match dynamic search params a glob pattern would be suitable (e.g.
['location-*-id']
).For Remix v1 the default should be
['*']
to match all search params, but for v2 an empty array to match no search params could be added.Beta Was this translation helpful? Give feedback.
All reactions