mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-02-24 11:33:09 +01:00
Add the hooks docs
This commit is contained in:
parent
e789249be3
commit
7856d018c5
@ -1 +1,7 @@
|
||||
# Use state
|
||||
# useState Hook
|
||||
|
||||
`useState` hook is used to manage the state of a component in functional components. Calling `useState` returns an array with two elements: the current state value and a function to update the state.
|
||||
|
||||
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
|
||||
<BadgeLink colorScheme='blue' badgeText='Official Docs' href='https://reactjs.org/docs/hooks-state.html'>Using the State Hook</BadgeLink>
|
||||
|
||||
|
@ -1 +1,6 @@
|
||||
# Use effect
|
||||
# useEffect Hook
|
||||
|
||||
`useEffect` is a special hook that lets you run side effects in React. It is similar to componentDidMount and componentDidUpdate, but it only runs when the component (or some of its props) changes.
|
||||
|
||||
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
|
||||
<BadgeLink colorScheme='blue' badgeText='Official Docs' href='https://reactjs.org/docs/hooks-effect.html'>Using the Effect Hook</BadgeLink>
|
||||
|
@ -1 +1,7 @@
|
||||
# Basic hooks
|
||||
# React Hooks
|
||||
|
||||
Hooks were introduced in React 16.8 and they let us use state and other React features without writing a class
|
||||
|
||||
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
|
||||
<BadgeLink colorScheme='blue' badgeText='Official Docs' href='https://reactjs.org/docs/hooks-intro.html'>Introduction to Hooks</BadgeLink>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user