TechnoZaure Mai 2019
Christopher Kade (@christo_kade)
They let you use state and other React features without writing a class.
100% backwards-compatible. Hooks don’t contain any breaking changes.
(allow you to) build your own Hooks to share reusable stateful logic between components.
Bye bye setState? 🤷♂️
What if my state is computed based on the previous state?
Sayonara, lifecycle hooks? 👋
How can I run clean-ups for my component?
Method is run before the component is removed from the UI
A (small) example of cleaning up a component 🧼
🎉
https://medium.zenika.com/react-hooks-my-introduction-81b15e6eff20
https://www.robinwieruch.de/react-hooks-fetch-data/
https://overreacted.io/a-complete-guide-to-useeffect/
Code: https://github.com/christopherkade/hooks-example
By christopherkade