Skip to content

Commit

Permalink
Expose React Hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Feb 21, 2019
1 parent 4e93164 commit 5cec1fa
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions packages/element/src/react.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ import {
Fragment,
isValidElement,
StrictMode,
useState,
useEffect,
useContext,
useReducer,
useCallback,
useMemo,
useRef,
useImperativeHandle,
useLayoutEffect,
useDebugValue,
} from 'react';
import { isString } from 'lodash';

Expand Down Expand Up @@ -93,6 +103,22 @@ export { isValidElement };

export { StrictMode };

/**
* Make React Hooks available
*/
export {
useCallback,
useContext,
useDebugValue,
useEffect,
useImperativeHandle,
useLayoutEffect,
useMemo,
useReducer,
useRef,
useState,
};

/**
* Concatenate two or more React children objects.
*
Expand Down

0 comments on commit 5cec1fa

Please sign in to comment.