Skip to content

Commit 1a1c4cd

Browse files
committed
Add hooks questions
1 parent bec0a5b commit 1a1c4cd

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@
320320
|304| [Is Hooks cover all use cases for classes?](#is-hooks-cover-all-use-cases-for-classes)|
321321
|305| [What is the stable release for hooks support?](#what-is-the-stable-release-for-hooks-support)|
322322
|306| [Why do we use square brackets in useState?](#why-do-we-use-square-brackets-in-usestate?)|
323+
|307| [What are the sources used for introducing hooks?](#what-are-the-sources-used-for-introducing-hooks)|
323324

324325
## Core React
325326

@@ -5080,4 +5081,11 @@
50805081
```javascript
50815082
const [count, setCount] = useState(0);
50825083
```
5083-
You can name anything for your own state variables.
5084+
You can name anything for your own state variables.
5085+
307. ### What are the sources used for introducing hooks?
5086+
Hooks got the ideas from several different sources. Below are some of them,
5087+
1. Previous experiments with functional APIs in the react-future repository
5088+
2. Community experiments with render prop APIs such as Reactions Component
5089+
3. State variables and state cells in DisplayScript.
5090+
4. Subscriptions in Rx.
5091+
5. Reducer components in ReasonReact.

0 commit comments

Comments
 (0)