useCallback hook in react

useCallBack hook is used to avoid creation of unnecessary callbacks creation. Generally callback functions are created every time component re-renders. But we do not need to create these functions for every render. We can memorize these callback functions and use the old callbacks if dependecies have not changed.

Complex problems, Simple Solutions