Skip to content

React Hooks are simple JavaScript functions that we can use to isolate the reusable part from a functional component. Hooks can be stateful and can manage side-effects. We will learn more about react hook in depth and how all the important modules in react hook work

Notifications You must be signed in to change notification settings

Barbarpotato/React-Hook-Fundamental

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

React-Hook-Fundamental

learn more about react hook in depth and how all the important modules in react work

useState Hook

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.

useEffect Hook

useEffect is a hook for encapsulating code that has 'side effects,' and is like a combination of componentDidMount, componentDidUpdate and componentWillUnmount. Previously, functional components didn't have access to the component life cycle, but with useEffect you can tap into it.

useContext Hook

useContext hook is used to create common data that can be accessed throughout the component hierarchy without passing the props down manually to each level.

useReducer Hook

useReducer is a React Hook that provides a way to manage state and perform state transitions in a React function component. It is similar to the redux library in that it allows you to centralize and manage the state of your application in a single location.

useCallback Hook

useCallback is a hook that will return a memoized version of the callback function that only changes if one of the dependencies has changed.

useMemo Hook

useMemo Hook allows you to optimize performance by memoizing a function's results. It helps to avoid re-rendering of a component when the inputs of a certain function have not changed.

useRef Hook

useRef Hook allows you to access the value of a DOM element or a state value across render cycles. It's commonly used to store a reference to an element in the DOM so that it can be manipulated, or to store a value that persists across render cycles.

About

React Hooks are simple JavaScript functions that we can use to isolate the reusable part from a functional component. Hooks can be stateful and can manage side-effects. We will learn more about react hook in depth and how all the important modules in react hook work

Topics

Resources

Stars

Watchers

Forks