This is a beginner-friendly and clean React web application that fetches data from a local db.json file using JSON Server. It displays quotes in a responsive table format and shows an error message if the JSON Server is not running.
The main goal of this project is to demonstrate how to fetch API data using the fetch() method in React and handle both success and error scenarios. It introduces beginners to working with mock APIs using JSON Server and dynamic rendering with React.
https://github.com/Manoj-Gmk/react-jsonserverapi.git
-
React
-
Vite
-
HTML5
-
JSON Server
-
JavaScript (ES6+)
git clone https://github.com/Manoj-Gmk/react-jsonserverapi.git
cd jsonserverapi
npm install
npm run dev
npx json-server --watch db.json --port 5000
Visit: (http://localhost:5173)
-
Fetches data using the native fetch() API in React.
-
Displays fetched quotes in a styled table.
-
Shows a friendly error message if the server is not reachable.
-
Uses useEffect and useState React hooks.
-
Responsive and clean UI.
-
Easy to understand for beginners.
Name: Manoj
Role: Frontend Developer (Fresher)
GitHub: https://github.com/Manoj-Gmk
Thank you for visiting! 🌟 Feel free to contribute or give feedback.