File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 320
320
| 304| [ Is Hooks cover all use cases for classes?] ( #is-hooks-cover-all-use-cases-for-classes ) |
321
321
| 305| [ What is the stable release for hooks support?] ( #what-is-the-stable-release-for-hooks-support ) |
322
322
| 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 ) |
323
324
324
325
## Core React
325
326
5080
5081
` ` ` javascript
5081
5082
const [count , setCount ] = useState (0 );
5082
5083
` ` `
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.
You can’t perform that action at this time.
0 commit comments