InterviewHubPRO
Section Overview
Q219

Question 219 of 445

Part 8: Advanced React Patterns, Portals & Performance (152 - 261)

49%
React & Modern Frontend (445 Qs)•Part 8: Advanced React Patterns, Portals & Performance (152 - 261)

What are the sources used for introducing hooks?

Hooks got the ideas from several different sources. Below are some of them,

  1. Previous experiments with functional APIs in the react-future repository
  2. Community experiments with render prop APIs such as Reactions Component
  3. State variables and state cells in DisplayScript.
  4. Subscriptions in Rx.
  5. Reducer components in ReasonReact.

Practical Code Example

text
// Sources inspiring Hooks:
// Prior research in Functional Reactive Programming, algebraic effects, and ReasonML component state.