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 Jan 26, 2020
1 parent f08af6a commit 48f3731
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/react-reconciler/src/ReactFiberHooks.js
Expand Up @@ -84,6 +84,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 @@ -125,6 +129,7 @@ export type HookType =
| 'useContext'
| 'useRef'
| 'useEffect'
| 'useHydrateableEffect'
| 'useLayoutEffect'
| 'useCallback'
| 'useMemo'
Expand Down Expand Up @@ -1391,6 +1396,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 48f3731

Please sign in to comment.