Making Sense of React Hooks

Why Hooks?

  • Huge components that are hard to refactor and test.
  • Duplicated logic between different components and lifecycle methods.
  • Complex patterns like render props and higher-order components.

Do Hooks Make React Bloated?

What Are Hooks, Exactly?

Show Me Some Code!

https://gist.github.com/gaearon/cb5add26336003ed8c0004c4ba820eae
https://gist.github.com/gaearon/cb5add26336003ed8c0004c4ba820eae
https://codesandbox.io/s/ppxnl191zx

So What About Classes?

But Aren’t Hooks Magic?

https://gist.github.com/gaearon/62866046e396f4de9b4827eae861ff19

Spread Love, Not Hype

Next Steps

Vitra — Portemanteau Hang it all

--

--

--

Working on @reactjs. Co-author of Redux and Create React App. Building tools for humans.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

5 NestJS Techniques to Build Efficient and Maintainable Apps

Understanding Immediately Invoked Function Expressions (IIFEs) in Javascript — With Simple Examples

Testing in React with Jest and Enzyme: An Introduction

Create an Elementor Sticky Column or Sticky Sidebar Only Within a Section

Javascript with Rails API project

Saving Postman Collection Test Results to a CSV File using Newman

The things you learn must to be a smart developer

Recursive Array Methods. Better Javascript through Haskell.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Dan Abramov

Dan Abramov

Working on @reactjs. Co-author of Redux and Create React App. Building tools for humans.

More from Medium

What is React?

React JS: Overview

React Hooks

React Components