Skip to content
This repository was archived by the owner on Sep 10, 2022. It is now read-only.

Latest commit

 

History

History
11 lines (8 loc) · 613 Bytes

react-hooks.md

File metadata and controls

11 lines (8 loc) · 613 Bytes

React Hooks

Hooks allow us to use state and other React features without components being defined by a class

Introduction

  • Hooks are an opt-in, non-breaking change that is 100% backward compatible
  • There are no plans to remove classes, but hooks will now provide a more direct API to the React concepts (ie. props, state, context, refs, and lifecylce)
  • Hooks were created to solve the difficulties with:
    • Reusing stateful logic between components because Hooks allows you to reuse stateful logic without changing your component hierarchy, allowing for the sharing of hooks between components