Skip to main content

Posts

Showing posts with the label Mastering useContext() in React

React Hooks: A Deep Dive

React Hooks: A Deep Dive React Hooks are a relatively new addition to React library. They allow us to use state and other React features without having to use class components or write boilerplate code.In this article, we will take a deep dive into most commonly used React Hooks are shown in table of contents. Back to TOC Table of Contents • useState • useEffect • useContext • useReducer • useCallback • useMemo • useRef • useLayoutEffect • useImperativeHandle • useMemo vs useCallback • useLayoutEffect • Custom Hooks • Conclusion • useState The useState Hook allows us to add state to our functional components. It takes an initial state value as a parameter and returns an array containing the cur...