Topics


Pages


Content

Hooks were added in React 16.8 and let you use state and lifecycle methods in a functional component, where before you had to use a class component.

Note that hooks must be used in functions and not nested within each other. You cannot add a useState hook within a useEffect hook.

Resources