forked from TanStack/query
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(hydration): move hydration utilities to core, keeping old exports (
- Loading branch information
1 parent
21f7b89
commit 1986127
Showing
8 changed files
with
45 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
src/hydration/tests/hydration.test.tsx → src/core/tests/hydration.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
export { dehydrate, hydrate } from './hydration' | ||
export { useHydrate, Hydrate } from './react' | ||
// This package once contained these functions, but they have now been moved | ||
// into the core and react packages. | ||
// They are re-exported here to avoid a breaking change, but this package | ||
// should be considered deprecated and removed in a future major version. | ||
export { dehydrate, hydrate, useHydrate, Hydrate } from 'react-query' | ||
|
||
// Types | ||
export type { | ||
DehydrateOptions, | ||
DehydratedState, | ||
HydrateOptions, | ||
ShouldDehydrateMutationFunction, | ||
ShouldDehydrateQueryFunction, | ||
} from './hydration' | ||
export type { HydrateProps } from './react' | ||
} from '../core/hydration' | ||
export type { HydrateProps } from '../react/Hydrate' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 10 additions & 3 deletions
13
src/hydration/tests/react.test.tsx → src/react/tests/Hydrate.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters