They allow you to make use of state along with other respond features without writing a course.
This brand new function useState is the very first “Hook” we’ll read about, but this instance is simply a teaser. Don’t worry if it doesn’t seem sensible yet!
You can begin learning Hooks from the page that is next. With this page, we’ll continue by explaining why we’re Hooks that is adding to and exactly how they are able to allow you to write great applications.
Respond 16.8.0 may be the release that is first help Hooks. When updating, don’t forget to upgrade all packages, including respond DOM. Respond Native supports Hooks considering that the 0.59 release of Respond Native.
At respond Conf 2018, Sophie Alpert and Dan Abramov introduced Hooks, accompanied by Ryan Florence showing how exactly to refactor a credit card applicatoin to make use of them. View the video clip right here:
No Breaking Changes
Before we continue, remember that Hooks are:
- Totally opt-in. You can look at Hooks in a couple of elements without rewriting any code that is existing.