Getting Closure on React Hooks

  • 347

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!

React - The Complete Guide (incl Hooks, React Router, Redux)
http://learnstartup.net/p/r1xQQR5aaW

State Management with React Hooks
https://morioh.com/p/2a32c780aea1

Top 10 Custom React Hooks you Should Have in Your Toolbox
https://morioh.com/p/4d254c6717a3

How to build a real-world app with React Hooks
https://morioh.com/p/e916c21a0317

How to Replace Redux with React Hooks and the Context API
https://morioh.com/p/6c81261ef884

#React #ReactHooks #JavaScript

Originally published at https://www.youtube.com/watch?v=KJP1E-Y-xyo

Social Network for Developers: http://bit.ly/2TFv1y0
Developer’s Store: http://bit.ly/2L27JNR
Learn Startup: http://bit.ly/2UDotMN
Learn to code: http://bit.ly/2pN2aXx
Fanpage: http://bit.ly/2LyM4fJ
Twitter: http://bit.ly/2J7vCS0