Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions packages/element/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
16 changes: 16 additions & 0 deletions packages/element/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**

- <https://reactjs.org/docs/react-api.html#reactlazy>

### RawHTML

[src/index.js#L5-L5](src/index.js#L5-L5)
Expand Down Expand Up @@ -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**

- <https://reactjs.org/docs/react-api.html#reactsuspense>

### switchChildrenNodeName

[src/index.js#L1-L1](src/index.js#L1-L1)
Expand Down
12 changes: 12 additions & 0 deletions packages/element/src/react.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import {
useImperativeHandle,
useLayoutEffect,
useDebugValue,
lazy,
Suspense,
} from 'react';
import { isString } from 'lodash';

Expand Down Expand Up @@ -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.
*
Expand Down