diff --git a/packages/element/CHANGELOG.md b/packages/element/CHANGELOG.md index 5cf43d26f2f3b8..db8c82c55972d4 100644 --- a/packages/element/CHANGELOG.md +++ b/packages/element/CHANGELOG.md @@ -1,3 +1,25 @@ +## 2.4.0 (Unreleased) + +### New Features + +- Added `lazy` feautre (see: https://reactjs.org/docs/react-api.html#reactlazy). +- Added `Suspense` component (see: https://reactjs.org/docs/react-api.html#reactsuspense). + +## 2.3.0 (2019-03-06) + +### New Features + +- Added `useCallback` hook (see: https://reactjs.org/docs/hooks-reference.html#usecallback). +- Added `useContext` hook (see: https://reactjs.org/docs/hooks-reference.html#usecontext). +- Added `useDebugValue` hook (see: https://reactjs.org/docs/hooks-reference.html#usedebugvalue). +- Added `useEffect` hook (see: https://reactjs.org/docs/hooks-reference.html#useeffect). +- Added `useImperativeHandle` hook (see: https://reactjs.org/docs/hooks-reference.html#useimperativehandle). +- Added `useLayoutEffect` hook (see: https://reactjs.org/docs/hooks-reference.html#uselayouteffect). +- Added `useMemo` hook (see: https://reactjs.org/docs/hooks-reference.html#usememo). +- Added `useReducer` hook (see: https://reactjs.org/docs/hooks-reference.html#usereducer). +- Added `useRef` hook (see: https://reactjs.org/docs/hooks-reference.html#useref). +- Added `useState` hook (see: https://reactjs.org/docs/hooks-reference.html#usestate). + ## 2.1.8 (2018-11-15) ## 2.1.7 (2018-11-09) diff --git a/packages/element/README.md b/packages/element/README.md index 1985045799bea0..44ae7e16ba2f42 100755 --- a/packages/element/README.md +++ b/packages/element/README.md @@ -239,6 +239,14 @@ Checks if an object is a valid WPElement `boolean`: true if objectToTest is a valid WPElement and false otherwise. +### lazy + +[src/index.js#L1-L1](src/index.js#L1-L1) + +**Related** + +- + ### RawHTML [src/index.js#L5-L5](src/index.js#L5-L5) @@ -289,6 +297,14 @@ Serializes a React element to string. Component that activates additional checks and warnings for its descendants. +### Suspense + +[src/index.js#L1-L1](src/index.js#L1-L1) + +**Related** + +- + ### switchChildrenNodeName [src/index.js#L1-L1](src/index.js#L1-L1) diff --git a/packages/element/src/react.js b/packages/element/src/react.js index b4b9ef4146533e..275e77276e229e 100644 --- a/packages/element/src/react.js +++ b/packages/element/src/react.js @@ -22,6 +22,8 @@ import { useImperativeHandle, useLayoutEffect, useDebugValue, + lazy, + Suspense, } from 'react'; import { isString } from 'lodash'; @@ -159,6 +161,16 @@ export { useRef }; */ export { useState }; +/** + * @see https://reactjs.org/docs/react-api.html#reactlazy + */ +export { lazy }; + +/** + * @see https://reactjs.org/docs/react-api.html#reactsuspense + */ +export { Suspense }; + /** * Concatenate two or more React children objects. *