Hook profile

Hook is a new feature in React 16.8. It lets you use state and other React features without having to write a class.

Why did You add Hooks to React and how can you use them to write better applications

React 16.8.0 was the first release to support hooks. When upgrading, be sure to update all packages, including the React DOM. React Native supports hooks starting with version 0.59.

Before we continue, remember that a Hook is:

Totally optional. You can try hooks in some components without rewriting any existing code. But you don’t have to learn or Hook now if you don’t want to.

100% backward compatible. Hooks do not contain any destructive changes.

Now available. Hook was released in V16.8.0.

There are no plans to remove classes from React. You can read more about progressive Hook strategies in the section at the bottom of this page.

Hook doesn’t affect your understanding of React concepts. Instead, hooks provide a more straightforward API for known React concepts: props, state, Context, refs, and lifecycle. As we’ll see later, hooks also provide a more powerful way to combine them.