This is a simple React application demonstrating the usage of 10 essential React Hooks.
While developing my main hobby project, Go-Blockchain, I realized that my knowledge of React's lifecycle methods wasn't translating effectively to the use of React Hooks in functional components. Therefore, I decided to create this small project as a learning exercise.
If you face similar challenges with React Hooks, you're welcome to use this code as a learning resource and playground.
- useCallback
- useContext
- useCustomHook
- useEffect
- useId
- useLayoutEffect
- useMemo
- useReducer
- useRef
- useState
The following instructions will guide you on how to get a copy of the project up and running on your local machine for development and learning purposes.
Before getting started, ensure you have Node.js and npm installed on your machine. If not, they can be downloaded and installed from here.
First, clone the repository using the following command:
git clone https://github.com/yelarsaks/react-hooks.git
Then, navigate to the project directory:
cd react-hooks
Next, install the project dependencies:
npm install
Finally, start the development server:
npm start
Your application should now be running and accessible at http://localhost:3000/react-hooks.