Getting Closure on Hooks (Lightning talk)

React @ Reactathon
Mar 29 2019 ( External link )

Description: The design of React Hooks requires a good understanding of closures in JavaScript. In this talk, we’ll reintroduce closures by building a tiny clone of React! This will serve two purposes – to demonstrate the effective use of closures, and to show how you can build a Hooks clone in just 29 lines of readable JS. Finally, we arrive at how you get Custom Hooks and the Rules of Hooks out of this incredible mental model!

{
  "title": "Getting Closure on Hooks (Lightning talk)",
  "slug": "react-hooks-lightning",
  "topic": "React",
  "venues": "Reactathon",
  "date": "2019-03-30T00:00:00.000Z",
  "article": "https://www.netlify.com/blog/2019/03/11/deep-dive-how-do-react-hooks-really-work/",
  "tweet": "https://twitter.com/swyx/status/1100809424963219456",
  "url": "https://www.reactathon.com/",
  "video": "https://youtu.be/Wt4kuspJIxY?t=3236",
  "desc": "Cloning the React Hooks API in raw JS",
  "description": "The design of React Hooks requires a good understanding of closures in JavaScript. In this talk, we’ll reintroduce closures by building a tiny clone of React! This will serve two purposes – to demonstrate the effective use of closures, and to show how you can build a Hooks clone in just 29 lines of readable JS. Finally, we arrive at how you get Custom Hooks and the Rules of Hooks out of this incredible mental model!",
  "pubdate": "2019-03-30T00:00:00.000Z"
}