removed duplicate subtopic, replaced content, shifted nodes up (#7424)

pull/7427/head
dsh 1 month ago committed by GitHub
parent 2571a7c52e
commit 5b29181d95
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 9
      src/data/roadmaps/react/content/usecallback@2zrN65JZhCyNimi33g78f.md
  2. 28
      src/data/roadmaps/react/content/usecallback@dgoDNDtW2_q9R9yhkXrcz.md
  3. 66
      src/data/roadmaps/react/react.json

@ -1,9 +0,0 @@
# useCallback
`useCallback` is a React hook that returns a memoized version of a callback function. It's used to optimize performance by preventing unnecessary re-renders. Specifically, it helps avoid recreating functions when their dependencies haven't changed, which can be useful when passing callbacks to child components that rely on referential equality to prevent re-rendering.
Visit the following resources to learn more:
- [@article@React Documentation on useCallback](https://react.dev/reference/react/useCallback)
- [@article@useCallback Explained in Depth](https://kentcdodds.com/blog/usememo-and-usecallback)
- [@article@useCallback Hook: An Introductory Guide](https://dmitripavlutin.com/dont-overuse-react-usecallback/)

@ -1,27 +1,9 @@
# Common Hooks # useCallback
React also has a lot of hooks that allow you to write more efficient React code. `useCallback` is a React hook that returns a memoized version of a callback function. It's used to optimize performance by preventing unnecessary re-renders. Specifically, it helps avoid recreating functions when their dependencies haven't changed, which can be useful when passing callbacks to child components that rely on referential equality to prevent re-rendering.
Visit the following resources to learn more: Visit the following resources to learn more:
- [@official@useCallback](https://react.dev/reference/react/useCallback) - [@article@React Documentation on useCallback](https://react.dev/reference/react/useCallback)
- [@official@useContext](https://react.dev/reference/react/useContext) - [@article@useCallback Explained in Depth](https://kentcdodds.com/blog/usememo-and-usecallback)
- [@official@useDebugValue](https://react.dev/reference/react/useDebugValue) - [@article@useCallback Hook: An Introductory Guide](https://dmitripavlutin.com/dont-overuse-react-usecallback/)
- [@official@useDeferredValue](https://react.dev/reference/react/useDeferredValue)
- [@official@useEffect](https://react.dev/reference/react/useEffect)
- [@official@useId](https://react.dev/reference/react/useId)
- [@official@useImperativeHandle](https://react.dev/reference/react/useImperativeHandle)
- [@official@useInsertionEffect](https://react.dev/reference/react/useInsertionEffect)
- [@official@useLayoutEffect](https://react.dev/reference/react/useLayoutEffect)
- [@official@useReducer](https://react.dev/reference/react/useReducer)
- [@official@useRef](https://react.dev/reference/react/useRef)
- [@official@useState](https://react.dev/reference/react/useState)
- [@official@useSyncExternalStore](https://react.dev/reference/react/useSyncExternalStore)
- [@official@useTransition](https://react.dev/reference/react/useTransition)
- [@article@useCallback Hook by Example](https://www.robinwieruch.de/react-usecallback-hook/)
- [@article@useMemo Hook by Example](https://www.robinwieruch.de/react-usememo-hook/)
- [@article@useContext Hook by Example](https://www.robinwieruch.de/react-usecontext-hook/)
- [@article@useReducer Hook by Example](https://www.robinwieruch.de/react-usereducer-hook/)
- [@article@useReducer vs useState Hook](https://www.robinwieruch.de/react-usereducer-vs-usestate/)
- [@video@useDefferedValue Hook video](https://www.youtube.com/watch?v=jCGMedd6IWA)
- [@feed@Explore top posts about React Hooks](https://app.daily.dev/tags/react-hooks?ref=roadmapsh)

@ -136,14 +136,14 @@
"id": "NeJdgNbsxiUjt_GBzub6Z", "id": "NeJdgNbsxiUjt_GBzub6Z",
"type": "section", "type": "section",
"position": { "position": {
"x": -249.52532545570534, "x": -248.52532545570534,
"y": 274.94433023898546 "y": 274.94433023898546
}, },
"width": 248, "width": 247,
"height": 255, "height": 168,
"style": { "style": {
"width": 248, "width": 247,
"height": 255 "height": 168
}, },
"selected": false, "selected": false,
"data": { "data": {
@ -153,7 +153,7 @@
} }
}, },
"positionAbsolute": { "positionAbsolute": {
"x": -249.52532545570534, "x": -248.52532545570534,
"y": 274.94433023898546 "y": 274.94433023898546
}, },
"dragging": false, "dragging": false,
@ -1199,7 +1199,7 @@
"type": "topic", "type": "topic",
"position": { "position": {
"x": 57.04484613528689, "x": 57.04484613528689,
"y": 553.4443302389855 "y": 541.5892656435051
}, },
"selected": false, "selected": false,
"data": { "data": {
@ -1220,7 +1220,7 @@
}, },
"positionAbsolute": { "positionAbsolute": {
"x": 57.04484613528689, "x": 57.04484613528689,
"y": 553.4443302389855 "y": 541.5892656435051
}, },
"dragging": false, "dragging": false,
"resizing": false, "resizing": false,
@ -1329,7 +1329,7 @@
"type": "subtopic", "type": "subtopic",
"position": { "position": {
"x": -249.95515386471317, "x": -249.95515386471317,
"y": 532.9443302389855 "y": 521.0892656435051
}, },
"selected": false, "selected": false,
"data": { "data": {
@ -1356,7 +1356,7 @@
"dragging": false, "dragging": false,
"positionAbsolute": { "positionAbsolute": {
"x": -249.95515386471317, "x": -249.95515386471317,
"y": 532.9443302389855 "y": 521.0892656435051
}, },
"selectable": true, "selectable": true,
"focusable": true, "focusable": true,
@ -1367,7 +1367,7 @@
"type": "label", "type": "label",
"position": { "position": {
"x": -195.52532545570534, "x": -195.52532545570534,
"y": 490 "y": 478.14493540451963
}, },
"selected": false, "selected": false,
"data": { "data": {
@ -1387,7 +1387,7 @@
}, },
"positionAbsolute": { "positionAbsolute": {
"x": -195.52532545570534, "x": -195.52532545570534,
"y": 490 "y": 478.14493540451963
}, },
"selectable": true, "selectable": true,
"focusable": true, "focusable": true,
@ -1583,44 +1583,6 @@
"dragging": false, "dragging": false,
"resizing": false "resizing": false
}, },
{
"id": "2zrN65JZhCyNimi33g78f",
"type": "subtopic",
"position": {
"x": -241.52532545570534,
"y": 438.44433023898546
},
"selected": false,
"data": {
"label": "useCallback",
"style": {
"fontSize": 17,
"justifyContent": "flex-start",
"textAlign": "center"
},
"legend": {
"id": "Z0WmUXWj-7draje3jE1WR",
"color": "#2d72d2",
"label": "Personal Recommendation (Opinion)",
"position": "left-center"
}
},
"zIndex": 999,
"width": 231,
"height": 49,
"style": {
"width": 231,
"height": 49
},
"positionAbsolute": {
"x": -241.52532545570534,
"y": 438.44433023898546
},
"selectable": true,
"focusable": true,
"dragging": false,
"resizing": false
},
{ {
"id": "FK59Zsm5ENA9g11XWCan_", "id": "FK59Zsm5ENA9g11XWCan_",
"type": "subtopic", "type": "subtopic",
@ -1663,7 +1625,7 @@
"type": "subtopic", "type": "subtopic",
"position": { "position": {
"x": -249.95515386471317, "x": -249.95515386471317,
"y": 585.9443302389855 "y": 574.0892656435051
}, },
"selected": false, "selected": false,
"data": { "data": {
@ -1690,7 +1652,7 @@
"dragging": false, "dragging": false,
"positionAbsolute": { "positionAbsolute": {
"x": -249.95515386471317, "x": -249.95515386471317,
"y": 585.9443302389855 "y": 574.0892656435051
}, },
"selectable": true, "selectable": true,
"focusable": true "focusable": true

Loading…
Cancel
Save