Revalidation behaviour of fetcher#load vs. fetcher#submit #9658
Unanswered
ericchernuka
asked this question in
Q&A
Replies: 1 comment
-
For API/resource routes, I would just stick with raw It would be nice if you could add a |
Beta Was this translation helpful? Give feedback.
0 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 currently using Remix for client-side data fetching using
useFetcher
. We typically have areas that we'd like to load the data once (modal, one time call to action) etc, but are wondering if when usingfetcher.load
orfetcher.submit(null, { method: "GET" })
are supposed to be forever subscribed to revalidations when actions are performed. We had thought the point of this would be or an imperative one-time data load, but now we're getting 10's of revalidations that are unexpected.I've reproduced this in a Stackblitz to show it occurs, whether this is intentional, and whether there's any way around this without having to bail out to raw
fetch
.Beta Was this translation helpful? Give feedback.
All reactions