Skip to content

Commit c0b6e0b

Browse files
committed
Add more exports
1 parent f7f92b8 commit c0b6e0b

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

beta/src/pages/apis/index.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ If you use React on the web, you'll also need the same version of [ReactDOM](/ap
3434

3535
## Exports {/*exports*/}
3636

37+
### State {/*state*/}
38+
3739
<YouWillLearnCard title="useState" path="/apis/usestate">
3840

3941
Declares a state variable.
@@ -46,6 +48,34 @@ function MyComponent() {
4648
4749
</YouWillLearnCard>
4850
51+
<YouWillLearnCard title="useReducer" path="/apis/usereducer">
52+
53+
Declares a state variable managed with a reducer.
54+
55+
```js
56+
function MyComponent() {
57+
const [state, dispatch] = useReducer(reducer, { age: 42 });
58+
// ...
59+
```
60+
61+
</YouWillLearnCard>
62+
63+
### Context {/*context*/}
64+
65+
<YouWillLearnCard title="useContext" path="/apis/usecontext">
66+
67+
Reads and subscribes to a context.
68+
69+
```js
70+
function MyComponent() {
71+
const theme = useContext(ThemeContext);
72+
// ...
73+
```
74+
75+
</YouWillLearnCard>
76+
77+
### Refs {/*refs*/}
78+
4979
<YouWillLearnCard title="useRef" path="/apis/useref">
5080
5181
Declares a ref.

0 commit comments

Comments
 (0)