|
1 |
| -# Contact book, part 3, integrating state management with Redux Toolkit |
2 |
| - |
3 |
| -## Refactoring Contact Book Application |
4 |
| -This project refactors the Contact Book app by integrating state management with Redux Toolkit. It includes actions for saving, deleting contacts, and updating the filter. The app uses `redux-persist` to store the contacts in `localStorage` and connects React components with Redux using `react-redux`. The initial Redux state consists of an empty contacts array and a filter string. |
| 1 | +# ✨ Contact book, integrating state management with Redux Toolkit ✨ |
5 | 2 |
|
6 | 3 | ## 🛠 Tools used
|
7 | 4 |
|
8 | 5 | [](https://skillicons.dev)
|
9 | 6 |
|
10 |
| -### Description |
11 |
| - |
12 |
| -This homework task is a simple contact management application for a phonebook, designed to practice fundamental React concepts and state management. The application allows users to add, display, search, and delete contacts, with each contact consisting of a name and a phone number. The project is structured to progressively introduce new features, demonstrating the importance of component-based architecture, controlled components, and state handling in React. |
13 |
| - |
14 |
| -### Key Features |
15 |
| - |
16 |
| -1. **Add Contacts**: Users can add contacts with a name and phone number. The application ensures that contact names adhere to a specific pattern and prevents the addition of duplicate names. |
17 |
| - |
18 |
| -2. **Search and Filter**: A search field is provided to filter contacts by name, with case-insensitive matching. |
| 7 | + |
| 8 | +This project refactors the Contact Book app by integrating state management with Redux Toolkit. It includes actions for saving, deleting contacts, and updating the filter. The app uses `redux-persist` to store the contacts in `localStorage` and connects React components with Redux using `react-redux`. The initial Redux state consists of an empty contacts array and a filter string. |
19 | 9 |
|
20 |
| -3. **Contact List Management**: Users can view a list of all contacts and remove any contact they no longer need. |
| 10 | + |
21 | 11 |
|
22 |
| -4. **Component Refactoring**: The application is refactored from a single component into multiple independent components, enhancing modularity and readability. |
| 12 | +- **Add Contacts**: Users can add contacts with a name and phone number. The application ensures that contact names adhere to a specific pattern and prevents the addition of duplicate names. |
| 13 | +- **Search and Filter**: A search field is provided to filter contacts by name, with case-insensitive matching. |
| 14 | +- **Contact List Management**: Users can view a list of all contacts and remove any contact they no longer need. |
| 15 | +- **Component Refactoring**: The application is refactored from a single component into multiple independent components, enhancing modularity and readability. |
23 | 16 |
|
24 |
| -### Key Learning Objectives: |
| 17 | + |
25 | 18 |
|
26 | 19 | - **State Management**: Manage and update state in React, particularly how to structure state to store multiple properties and handle user inputs in a controlled manner.
|
27 |
| - |
28 | 20 | - **Componentization**: The importance of breaking down an application into smaller, reusable components became evident. This approach not only simplifies development but also makes the codebase easier to maintain and scale.
|
29 |
| - |
30 | 21 | - **Form Handling**: Experience in handling forms in React, including managing controlled inputs and validating user data through patterns and required fields.
|
31 |
| - |
32 | 22 | - **Conditional Rendering**: Implementing conditional logic to prevent duplicate contacts from being added, which reinforced the concept of controlling what gets rendered based on the application's state.
|
33 |
| - |
34 | 23 | - **Refactoring and Code Organization**: Refactoring the application into separate components taught me the significance of organizing code in a way that promotes reusability and separation of concerns.
|
35 |
| - |
36 | 24 | - **User Experience Considerations**: Enhancing the user experience by providing feedback (such as alerts) and ensuring the interface remains responsive and intuitive.
|
37 |
| - |
38 | 25 | This project served as a solid foundation for building more complex React applications, emphasizing the core principles of React and good development practices.
|
39 | 26 |
|
40 |
| ---- |
41 |
| - |
42 | 27 | ### Step 1
|
43 | 28 | The application should include a form and a contact list. In the current step, implement the ability to add a contact name and display it in the contact list. The application does not need to save contacts between different sessions (page refreshes).
|
44 | 29 |
|
|
0 commit comments