Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Why we’ll all use React Hooks

Why we’ll all use React Hooks

This is the deck of my talk at FrontEnd Con 2018 (https://frontend-con.io/) in Warsaw, Poland on December 4th, 2018.

Hooks are a new feature proposal that lets you use state and other React features without writing a class. In this talk attendees could learn exactly what they are and how can they make React projects better.

Marcin Hagmajer

December 04, 2018
Tweet

Other Decks in Programming

Transcript

  1. Impure requirements • component state • data fetching • animations

    • notifications • subscriptions • more…
  2. “In the longer term, we expect Hooks to be the

    primary way people write React components.”
  3. Rules of hooks • useYourHook naming • Only Call Hooks

    at the Top Level • Only Call Hooks from React Functions
  4. Additional hooks • useReducer • useCallback • useMemo • useRef

    • useImperativeMethods • useLayoutEffects
  5. 100% backward compatible “At Facebook, we have tens of thousands

    of components written as classes, and we have absolutely no plans to rewrite them.”