Exposing hydration utilities without dependency on React #2370
Unanswered
DamianOsipiuk
asked this question in
Ideas
Replies: 2 comments 6 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
-
Is it not it’s separate rollup entry? https://github.com/tannerlinsley/react-query/blob/master/rollup.config.js#L22 |
Beta Was this translation helpful? Give feedback.
6 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.
-
Currently, hydration utilities are exposed together with react hooks. This creates a dependency on React which is unwanted for different frameworks.
Ideally, hydration utilities would be exposed separately. Either by moving them to the core, or exposing them as a separate entry with a rollup.
https://github.com/tannerlinsley/react-query/blob/master/src/hydration/index.ts
Does it make sense to move
hydrate
anddehydrate
to the core?Currently, a workaround is to keep an exact copy of the utility implementation.
Beta Was this translation helpful? Give feedback.
All reactions