diff --git a/beta/src/pages/apis/index.md b/beta/src/pages/apis/index.md index 63cd2c3e..712b8a17 100644 --- a/beta/src/pages/apis/index.md +++ b/beta/src/pages/apis/index.md @@ -34,6 +34,8 @@ If you use React on the web, you'll also need the same version of [ReactDOM](/ap ## Exports {/*exports*/} +### State {/*state*/} + Declares a state variable. @@ -46,6 +48,34 @@ function MyComponent() { + + +Declares a state variable managed with a reducer. + +```js +function MyComponent() { + const [state, dispatch] = useReducer(reducer, { age: 42 }); + // ... +``` + + + +### Context {/*context*/} + + + +Reads and subscribes to a context. + +```js +function MyComponent() { + const theme = useContext(ThemeContext); + // ... +``` + + + +### Refs {/*refs*/} + Declares a ref.