You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> 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.
-**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.
15
12
-**Search and Filter**: A search field is provided to filter contacts by name, with case-insensitive matching.
16
13
-**Contact List Management**: Users can view a list of all contacts and remove any contact they no longer need.
17
14
-**Component Refactoring**: The application is refactored from a single component into multiple independent components, enhancing modularity and readability.
-**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.
22
19
-**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.
@@ -26,7 +23,7 @@ Added storing phonebook contacts in localStorage. Component life cycle methods u
26
23
-**User Experience Considerations**: Enhancing the user experience by providing feedback (such as alerts) and ensuring the interface remains responsive and intuitive.
27
24
This project served as a solid foundation for building more complex React applications, emphasizing the core principles of React and good development practices.
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).
32
29
@@ -53,7 +50,7 @@ state = {
53
50
54
51
Each contact should be an object with the properties `name` and `id`. To generate IDs, use any package intended for this task, such as nanoid.
Extend the application's functionality by allowing users to add phone numbers. To do this, add `<input type="tel">` to the form and a property to store the value in the state.
59
56
@@ -77,7 +74,7 @@ Use the markup below (input) for the contact number.
If your application is implemented in a single `<App>` component, refactor the code to separate the parts of the application into different independent components.
117
114
@@ -139,8 +136,10 @@ After refactoring, the root component of the application will look like this:
Prevent the user from adding contacts whose names are already present in the phonebook. In case of an attempt to do so, display an alert with a warning.
0 commit comments