Posts
Showing posts from July, 2022
React
- Get link
- X
- Other Apps
https://www.youtube.com/watch?v=b8pAPWsWIE4&t=400s The React useState Hook allows us to track state in a function component. State generally refers to data or properties that need to be tracking in an application. The useEffect Hook allows you to perform side effects in your components. Some examples of side effects are: fetching data, directly updating the DOM, and timers. useEffect accepts two arguments. The second argument is optional. useEffect(<function>, <dependency>) useContext React Context is a way to manage state globally. The useRef Hook allows you to persist values between renders. The useReducer Hook is similar to the useState Hook. The React useCallback Hook returns a memoized callback function. The React useMemo Hook returns a memoized value. Custom Hooks When you have component logic that needs to be used by multiple components, we can extract that logic to a custom Hook. npm ERR! code ERR_SOCKET_TIMEOUT npm ERR! network Socket timeout npm config set fe