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.