Skip to content

Error using useHydrateAtoms with Next.js parallel-routes #2526

Answered by dai-shi
npearson72 asked this question in Bug report
Discussion options

You must be logged in to vote

the behavior is the same with and without dangerouslyForceHydrate

Okay, then I think this is something not possible to work around on our end.

<ComponentA dataFromServer={data}>
  <ComponentB /> // <--- Notice I am not prop drilling, but instead am using useAtomValue
</ComponentA />

It means, ComponentB renders first and then ComponentA.
So, it's an expected behavior, and the workaround is <ComponentB dataFromServer={data} />.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@npearson72
Comment options

Comment options

You must be logged in to vote
1 reply
@npearson72
Comment options

Answer selected by npearson72
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants