This is a fresh react-app project, Entry point for the app is index.js, there is a main component called App.js, try to wrap all your components (form, search and table) as children under App.js.
- Fork the repo.
- Clone the forked repo into your machine.
- run
npm i. - Write your solution.
- Commit and push your changes to the repo.
- Do pull request.
1 - Create the following UI and controls:
- Add form to the top of the table to add new patient to the patients list.
- Add search input to enable the user searchs for a patient by his full name or phone.
- Add table that display patients list.
2- Display patients list in the table.
3- Add new patient to the list by entering patient information in the form and click on
addsubmit button. clear the inputs after submitting. 4- Implement search functionality: the user can seacrh for patient by full name of phone, the table must be updated while the user typing, if the input become empty then reset table to display the original data
5- (Optional) delete patient row from the table: delete patient row from the table if the user click on delete button for any row.
- You can use flexbox to make the page look as much as possible similar to the provided UI.
- use
mapjs function to iterate through patients list and render it in a table. - add
Addbutton inside the form as submit button and handleonSubmitevent to collect data from inputs and add them as object to the list. - you can use
.filterjs function to do the search on the list. - you may define the following states in your
App.jscomponent:- fullName(text), phone(text), Gender(select), date(picker), submit input (add).
- searchValue
- patients and filteredPatients
- Always let table filled with
filteredPatientsand keep patients copy to be the original copy and don't modify it. - in case user clears search input, you can restore patients data from
patientslist tofilteredPatients. - Regarding feature
deletepatient from the table, you can pass id of selected patient to the onClick callback function in.mapcallback function. use passed id as the key to find the object in the list and remove it. usefindorfindIndexjs for this purpose.
This is a simple UI that you have to follow and implement in your design.

Colors:
- Blue: #3995FF
- Red: #FF5353
DONE