This repository has been archived by the owner on Jan 1, 2025. It is now read-only.
Any tips for Recoil with SSR(Next.js)? #2026
Answered
by
tpatalas
jiwoo-choi
asked this question in
Q&A
-
I'm using Next.js, and I pre-fetched and initialized api data using RecoilRoot's initializeState props.
The problem is that it is very tricky to use with For Example:
Are there alternatives or tips for this case? |
Beta Was this translation helpful? Give feedback.
Answered by
tpatalas
Sep 22, 2022
Replies: 1 comment 3 replies
-
Why don't you use Atom Effect if you want to refetch the data? I personally think fetching through Atom Effect is much powerful than just using selector (which is one way data flow, read-only). |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
jiwoo-choi
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why don't you use Atom Effect if you want to refetch the data? I personally think fetching through Atom Effect is much powerful than just using selector (which is one way data flow, read-only).
https://recoiljs.org/docs/guides/atom-effects