React provids a variety of hooks developer can use. However, some developers want to make custom hook which they need in specific case. So, On this post I in…
Read more »1. useReducer useReducer is a hook that helps manage state. It's an alternative to useState. It's useful for handling complex state logic where the n…
Read more »1. forwardRef forwardRef is React hook which can allow parent component to pass HTML Element through a child component to access child's underlying DOM n…
Read more »1. useCallback useCallback is React Hook which prevent it from being created on every render unless its dependency changes. 2. Before useCallback import log…
Read more »1. useMemo useMemo is react hook for performance optimization by memorizing the result of expensive computation. 2.Sample Code import logo from './log…
Read more »1. useContext useContext is a React Hook that enables function components to share data across the component tree without manuall passing props down. 2. Samp…
Read more »1.useRef useRef is React hook used by React to store values that are not required for rendering or to directly access DOM elements. 2. Sample Code import lo…
Read more »1.useEffect 'useEffect' is a hook that allows you to perform side effect in functional component. 2.Default use of useEffect import logo from '…
Read more »