useFetcher persistent after component is unmount (so accessible with useFetchers) #2623
blasterbug
started this conversation in
Proposals
Replies: 1 comment 4 replies
-
I'm not sure what your use case is, but can't you create the fetcher from a parent component and pass it to the child as a prop? |
Beta Was this translation helpful? Give feedback.
4 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.
-
Hi,
I have this edge case where I do not control when some components are unmounted because it is done by a third-party library. Essentially, I would like to be able to keep accessing fetchers/requests started by a
useFetcher
hook, even when the component calling this hook is unmounted. So the fetcher would be still accessible fromuseFecthers
hook. Is it possible to add an option to the fetcher object/Form something likecancel: false
?// Ben
Beta Was this translation helpful? Give feedback.
All reactions