Skip to content

Commit

Permalink
fix: Add useHydrateableEffect to flow types
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Dec 2, 2019
1 parent 15f7d95 commit e7f2e4b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/react-reconciler/src/ReactFiberHooks.js
Expand Up @@ -86,6 +86,10 @@ export type Dispatcher = {
create: () => (() => void) | void,
deps: Array<mixed> | void | null,
): void,
useHydrateableEffect(
create: () => (() => void) | void,
deps: Array<mixed> | void | null,
): void,
useCallback<T>(callback: T, deps: Array<mixed> | void | null): T,
useMemo<T>(nextCreate: () => T, deps: Array<mixed> | void | null): T,
useImperativeHandle<T>(
Expand Down Expand Up @@ -128,6 +132,7 @@ export type HookType =
| 'useContext'
| 'useRef'
| 'useEffect'
| 'useHydrateableEffect'
| 'useLayoutEffect'
| 'useCallback'
| 'useMemo'
Expand Down Expand Up @@ -1378,6 +1383,7 @@ export const ContextOnlyDispatcher: Dispatcher = {
useEffect: throwInvalidHookError,
useImperativeHandle: throwInvalidHookError,
useLayoutEffect: throwInvalidHookError,
useHydrateableEffect: throwInvalidHookError,
useMemo: throwInvalidHookError,
useReducer: throwInvalidHookError,
useRef: throwInvalidHookError,
Expand Down

0 comments on commit e7f2e4b

Please sign in to comment.