Skip to content

Commit

Permalink
new: react-hooks.md
Browse files Browse the repository at this point in the history
  • Loading branch information
byt3h3ad committed Mar 1, 2024
1 parent 13def9c commit 975b5aa
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions react/react-hooks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# React Hooks in a Nutshell

- **useState:** Hold/update values + re-render.

- **useRef:** Hold values, no re-render.

- **useEffect:** Execute side effects after render.

- **useReducer:** useState with reducers.

- **useMemo:** Cache values between renders.

- **useCallback:** Retain function identities.

[source](https://x.com/_georgemoller/status/1763363283883487516)

0 comments on commit 975b5aa

Please sign in to comment.