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 202c128 commit ad10a1f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/react-reconciler/src/ReactFiberHooks.js
Expand Up @@ -87,6 +87,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 @@ -129,6 +133,7 @@ export type HookType =
| 'useContext'
| 'useRef'
| 'useEffect'
| 'useHydrateableEffect'
| 'useLayoutEffect'
| 'useCallback'
| 'useMemo'
Expand Down Expand Up @@ -1379,6 +1384,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 ad10a1f

Please sign in to comment.