Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shyamsundernt/day30task
Axios CURD task
https://github.com/shyamsundernt/day30task
axios-react css html reactjs router-dom
Last synced: 5 days ago
JSON representation
Axios CURD task
- Host: GitHub
- URL: https://github.com/shyamsundernt/day30task
- Owner: ShyamSunderNT
- Created: 2024-05-29T05:05:57.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-06-01T16:50:39.000Z (8 months ago)
- Last Synced: 2024-06-02T14:16:53.788Z (8 months ago)
- Topics: axios-react, css, html, reactjs, router-dom
- Language: JavaScript
- Homepage: https://tourmaline-strudel-78e99f.netlify.app/
- Size: 49.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
React Axios Task
A simple React project demonstrating the use of Axios for making HTTP requests to interact with an API.Table of Contents
Introduction
Features
Usage
API Endpoints# Introduction
This project is a basic React application that utilizes Axios to perform CRUD (Create, Read, Update, Delete) operations with a RESTful API. The purpose is to demonstrate how to integrate Axios into a React application to handle HTTP requests and manage state.# Features
Fetch data from an API
Create new data entries
Update existing data entries
Delete data entries
Manage loading and error states# Usage
This section will guide you on how to use the application.Fetching Data
To fetch data from the API, navigate to the main page and click the "Fetch Data" button. This will send a GET request to the API and display the results.Creating Data
To create a new entry, fill out the form on the "Create" page and submit it. This will send a POST request to the API.Updating Data
To update an existing entry, navigate to the "Update" page, select an entry, modify the fields, and submit. This will send a PUT request to the API.Deleting Data
To delete an entry, navigate to the "Delete" page, select an entry, and confirm the deletion. This will send a DELETE request to the API.# API Endpoints
data link https://665606013c1d3b60293bf8c6.mockapi.io/api/user
Here are the endpoints used in this project:
GET /api/data - Fetch all data
POST /api/data - Create a new data entry
PUT /api/data/:id - Update an existing data entry
DELETE /api/data/:id - Delete an existing data entry