This project is an upgraded version of the Phonebook application, rebuilt using Redux Toolkit instead of local React state.
The main goal of this homework is to practice global state management, Redux slices, and state persistence using Redux Persist.
-
GitHub Repository:
https://github.com/kutluhangil/goit-react-hw-06 -
Live Demo (Vercel):
https://goit-react-hw-06-psi-gold.vercel.app/
- React
- Vite
- Redux Toolkit
- React Redux
- Redux Persist
- Formik & Yup
- nanoid
- CSS Modules
- Prettier
npm install @reduxjs/toolkit react-redux redux-persist npm install formik yup nanoid
src ├── components │ ├── Contact │ ├── ContactForm │ ├── ContactList │ └── SearchBox ├── redux │ ├── contactsSlice.js │ ├── filtersSlice.js │ └── store.js ├── App.jsx ├── App.module.css └── main.jsx
The Phonebook application allows users to add, delete, and filter contacts. All application state is managed globally via Redux Toolkit.
- Add new contacts with validation
- Delete existing contacts
- Filter contacts by name
- Persist data using localStorage
- Premium UI built with CSS Modules
{
contacts: {
items: []
},
filters: {
name: ""
}
}
- Add contact
- Delete contact
- Select contacts list
- Update name filter
- Select filter value
Contacts are persisted using Redux Persist. The state is automatically saved to and restored from localStorage.
- User interacts with UI
- Redux action is dispatched
- Reducer updates the store
- Subscribed components re-render
- Redux Toolkit integration
- Multiple Redux slices
- Selectors instead of prop drilling
- Persistent global state
- Clean, scalable architecture
Happy coding 🚀 — React + Redux Toolkit