Skip to content

Commit 0c6a26f

Browse files
jamiebuildssophiebits
authored andcommittedDec 12, 2018
Hooks proposal has been accepted (reactjs#1485)
1 parent 0636e4e commit 0c6a26f

9 files changed

+14
-14
lines changed
 

‎content/docs/hooks-custom.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ next: hooks-reference.html
66
prev: hooks-rules.html
77
---
88

9-
*Hooks* are a new feature proposal that lets you use state and other React features without writing a class. They're currently in React v16.7.0-alpha and being discussed in [an open RFC](https://github.com/reactjs/rfcs/pull/68).
9+
*Hooks* are an upcoming feature that lets you use state and other React features without writing a class. They're currently in React v16.7.0-alpha.
1010

1111
Building your own Hooks lets you extract component logic into reusable functions.
1212

@@ -103,7 +103,7 @@ The purpose of our `useFriendStatus` Hook is to subscribe us to a friend's statu
103103
```js
104104
function useFriendStatus(friendID) {
105105
const [isOnline, setIsOnline] = useState(null);
106-
106+
107107
// ...
108108

109109
return isOnline;

‎content/docs/hooks-effect.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ next: hooks-rules.html
66
prev: hooks-intro.html
77
---
88

9-
*Hooks* are a new feature proposal that lets you use state and other React features without writing a class. They're currently in React v16.7.0-alpha and being discussed in [an open RFC](https://github.com/reactjs/rfcs/pull/68).
9+
*Hooks* are an upcoming feature that lets you use state and other React features without writing a class. They're currently in React v16.7.0-alpha.
1010

1111
The *Effect Hook* lets you perform side effects in function components:
1212

‎content/docs/hooks-faq.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ permalink: docs/hooks-faq.html
55
prev: hooks-reference.html
66
---
77

8-
*Hooks* are a new feature proposal that lets you use state and other React features without writing a class. They're currently in React v16.7.0-alpha and being discussed in [an open RFC](https://github.com/reactjs/rfcs/pull/68).
8+
*Hooks* are an upcoming feature that lets you use state and other React features without writing a class. They're currently in React v16.7.0-alpha.
99

1010
This page answers some of the frequently asked questions about [Hooks](/docs/hooks-overview.html).
1111

‎content/docs/hooks-intro.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ permalink: docs/hooks-intro.html
55
next: hooks-overview.html
66
---
77

8-
*Hooks* are a new feature proposal that lets you use state and other React features without writing a class. They're currently in React v16.7.0-alpha and being discussed in [an open RFC](https://github.com/reactjs/rfcs/pull/68).
8+
*Hooks* are an upcoming feature that lets you use state and other React features without writing a class. They're currently in React v16.7.0-alpha.
99

1010
```js{4,5}
1111
import { useState } from 'react';

‎content/docs/hooks-overview.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ next: hooks-state.html
66
prev: hooks-intro.html
77
---
88

9-
*Hooks* are a new feature proposal that lets you use state and other React features without writing a class. They're currently in React v16.7.0-alpha and being discussed in [an open RFC](https://github.com/reactjs/rfcs/pull/68).
9+
*Hooks* are an upcoming feature that lets you use state and other React features without writing a class. They're currently in React v16.7.0-alpha.
1010

1111
Hooks are [backwards-compatible](/docs/hooks-intro.html#no-breaking-changes). This page provides an overview of Hooks for experienced React users.
1212

@@ -251,15 +251,15 @@ function Example() {
251251
const theme = useContext(ThemeContext);
252252
// ...
253253
}
254-
```
254+
```
255255

256256
And [`useReducer`](/docs/hooks-reference.html#usereducer) lets you manage local state of complex components with a reducer:
257257

258258
```js{2}
259259
function Todos() {
260260
const [todos, dispatch] = useReducer(todosReducer);
261261
// ...
262-
```
262+
```
263263

264264
>Detailed Explanation
265265
>

‎content/docs/hooks-reference.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ prev: hooks-custom.html
66
next: hooks-faq.html
77
---
88

9-
*Hooks* are a new feature proposal that lets you use state and other React features without writing a class. They're currently in React v16.7.0-alpha and being discussed in [an open RFC](https://github.com/reactjs/rfcs/pull/68).
9+
*Hooks* are an upcoming feature that lets you use state and other React features without writing a class. They're currently in React v16.7.0-alpha.
1010

1111
This page describes the APIs for the built-in Hooks in React.
1212

‎content/docs/hooks-rules.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ next: hooks-custom.html
66
prev: hooks-effect.html
77
---
88

9-
*Hooks* are a new feature proposal that lets you use state and other React features without writing a class. They're currently in React v16.7.0-alpha and being discussed in [an open RFC](https://github.com/reactjs/rfcs/pull/68).
9+
*Hooks* are an upcoming feature that lets you use state and other React features without writing a class. They're currently in React v16.7.0-alpha.
1010

1111
Hooks are JavaScript functions, but you need to follow two rules when using them. We provide a [linter plugin](https://www.npmjs.com/package/eslint-plugin-react-hooks) to enforce these rules automatically:
1212

‎content/docs/hooks-state.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ next: hooks-effect.html
66
prev: hooks-overview.html
77
---
88

9-
*Hooks* are a new feature proposal that lets you use state and other React features without writing a class. They're currently in React v16.7.0-alpha and being discussed in [an open RFC](https://github.com/reactjs/rfcs/pull/68).
9+
*Hooks* are an upcoming feature that lets you use state and other React features without writing a class. They're currently in React v16.7.0-alpha.
1010

1111
The [previous page](/docs/hooks-intro.html) introduced Hooks with this example:
1212

@@ -197,7 +197,7 @@ Let's now **recap what we learned line by line** and check our understanding.
197197
-->
198198
```js{1,4,9}
199199
1: import { useState } from 'react';
200-
2:
200+
2:
201201
3: function Example() {
202202
4: const [count, setCount] = useState(0);
203203
5:
@@ -273,7 +273,7 @@ We provide more recommendations on splitting independent state variables [in the
273273
274274
## Next Steps
275275
276-
On this page we've learned about one of the Hooks provided by React, called `useState`. We're also sometimes going to refer to it as the "State Hook". It lets us add local state to React function components -- which we did for the first time ever!
276+
On this page we've learned about one of the Hooks provided by React, called `useState`. We're also sometimes going to refer to it as the "State Hook". It lets us add local state to React function components -- which we did for the first time ever!
277277
278278
We also learned a little bit more about what Hooks are. Hooks are functions that let you "hook into" React features from function components. Their names always start with `use`, and there are more Hooks we haven't seen yet.
279279

‎content/docs/nav.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
title: JS Environment Requirements
105105
- id: glossary
106106
title: Glossary
107-
- title: Hooks (Proposal)
107+
- title: Hooks (Preview)
108108
isOrdered: true
109109
items:
110110
- id: hooks-intro

0 commit comments

Comments
 (0)