useFetcher
within a Context?
#9905
Unanswered
nikolailehbrink
asked this question in
Q&A
Replies: 1 comment 3 replies
-
If you add a key to the fetcher like |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We're using
useFetcher
within a Context to fetch pricing data on our routes. The goal is to avoid unnecessary fetches when navigating between routes that result in the same pricing data. Here's a simplified version of what we're doing:In this setup, we're caching the parameters used in
useFetcher
calls to avoid redundant network requests when the data is already fetched for a specific route.Is this an optimal way to preserve data and prevent unnecessary fetches with
useFetcher
, or is there a better pattern or built-in approach within Remix to handle this scenario?Beta Was this translation helpful? Give feedback.
All reactions