Skip to content
Discussion options

You must be logged in to vote

useFetcher() is probably your best bet. When the drawer opens you call fetcher.load(). The fetcher will give you a loading state on fetcher.state and you can access the data that it fetches with fetcher.data.

And since you're rendering this at the root of the app, you should be able to prefetch You can even prefetch the data anywhere in your app by using the key parameter. https://remix.run/docs/en/main/hooks/use-fetcher#key

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@altxnate
Comment options

@dest1n1s
Comment options

Answer selected by altxnate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants