Skip to main content
InterviewHubPRO
Section Overview
Q219

Question 219 of 407

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

54%
React Core & Hooks (407 Qs)•Part 8: Advanced React Patterns, Portals & Performance (152 - 261)

What are the sources used for introducing hooks?

junior LevelCode ExampleHooksFormsPerformance

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.