Open In App

Which versions of React include Hooks?

Last Updated : 25 Jan, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

React Hooks were introduced in React version 16.8. They were a significant addition to the React library and provided a new way to work with stateful logic and side effects in functional components. Before the introduction of Hooks, stateful logic was primarily managed in class components using the lifecycle methods.

React Hooks, including useState, useEffect, useContext, and others, were introduced in React 16.8. Therefore, if you want to use Hooks in your React components, make sure your project is using React version 16.8 or later. It’s generally recommended to use the latest stable version of React for new projects to benefit from the latest features, improvements, and bug fixes.

React includes a stable implementation of React Hooks for:

Note that to enable Hooks, all React packages need to be 16.8.0 or higher. Hooks won’t work if you forget to update, for example: React DOM.


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads