This repository contains multiple mini React projects that helped me revise and strengthen my understanding of core React concepts including Hooks, Context API, Redux Toolkit, Tailwind CSS, and React Router DOM. Each project is built step by step by solving real errors and questions I faced during development.
- state management using usestate
- how to change the state .
- Used Context to toggle between light and dark mode.
- Applied conditional Tailwind classes based on dark/light mode.
- Learned the difference between using a simple function and arrow function in event handling.
- Managed todo list using Context API.
- Passed state and dispatch methods using a provider.
- Used
useState,useEffectto store and fetch todos fromlocalStorage. - Solved the arrow function confusion vs normal function in
onClickhandlers.
- Built a scalable todo app using Redux Toolkit.
- Properly configured
createSlice,nanoidfor unique IDs. - Solved a critical mistake in dispatching action:
- Initially dispatched a string — fixed by dispatching an object like
{ text: inputValue }.
- Initially dispatched a string — fixed by dispatching an object like
- Understood and applied Redux payload structure correction.
- Used
useSelector,useDispatchto access and modify Redux store.
- Practiced route creation using
createBrowserRouterandcreateRoutesFromElements. - Solved the Route.Provider error by using the correct
<Route>element. - Understood the importance of using
<Layout />instead ofLayoutto avoid "function as child" errors.
- Used Tailwind classes such as:
duration— for transition timing.shrink-0— to prevent flex children from shrinking.gapvsmargin— learned their usage difference in layouts.
- Solved issue when Tailwind didn’t work due to deleting
index.css— reconfiguredtailwind.config.jsandpostcss.config.js.
| ❌ Error | 💡 Solution |
|---|---|
Route.Provider is not valid |
Replaced with correct <Route> |
| Function as child warning | Used <Layout /> instead of Layout |
| Redux payload undefined | Fixed by dispatching object: { text: inputValue } |
todo.text not rendering |
Passed correct structure to reducer |
| VS Code not detecting file rename | Used Developer: Reload Window |
- React.js (with Hooks)
- Context API
- Redux Toolkit
- React Router DOM v6
- Tailwind CSS
- Vite
- React Hooks:
useState,useEffect,useContext - Context API vs Redux Toolkit differences
- Proper Redux Toolkit slice creation
- Event handling differences between arrow function and simple function
- Route setup with React Router DOM
- Tailwind CSS utility-first design
- Debugging real-world React errors
git clone https://github.com/Muteeb-Haider55/React-Practice-Projects.git
cd React-Practice-Projects
npm install
npm run dev