Skip to content

Commit

Permalink
fix(types): make hydrate children optional
Browse files Browse the repository at this point in the history
because technically, it could live next to your App, as long as it's under the Provider:

<QueryClientProvider>
  <Hydrate />
  <App />
</QueryClientProvider>
  • Loading branch information
TkDodo committed Apr 8, 2022
1 parent 58e2dae commit effcf06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/reactjs/Hydrate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export function useHydrate(state: unknown, options: HydrateOptions = {}) {
export interface HydrateProps {
state?: unknown
options?: HydrateOptions
children: React.ReactNode
children?: React.ReactNode
}

export const Hydrate = ({ children, options, state }: HydrateProps) => {
Expand Down

0 comments on commit effcf06

Please sign in to comment.