This project is a simple React application that integrates with a local API (user-management-api), which is already available in one of my GitHub repositories. The application allows users to register, list, and delete users by interacting with the API.
- π User Registration: Users can enter their name and age, then submit the form to store the data via a
POSTrequest. - π User Listing: Fetch and display all users stored in the API through a
GETrequest. - ποΈ User Deletion: Remove users from the list with a
DELETErequest. - π Navigation: Seamless navigation between the registration page and the user list page using
react-router-dom.
- βοΈ React (Hooks:
useState,useEffect,useRef,useNavigate) - π Axios (for handling API requests)
- π€οΈ React Router (for navigation)
- π¨ Styled Components (for styling)
- Clone this repository:
git clone https://github.com/CamilleGS/react-studies.git
- Navigate to the project directory:
cd react-studies - Install dependencies:
npm install
- Ensure the
user-management-apiis running locally onhttp://localhost:3001. If you haven't cloned it yet, you can find it in my GitHub repository: order-management-api - Start the React app:
npm start
- Open
http://localhost:3000in your browser. - Add a new user by entering a name and age, then clicking the "Cadastrar" button.
- Navigate to the users list to view all registered users.
- Delete a user by clicking the trash icon.
This project is open-source and available under the MIT License.