This is a simple web application built using React.js and powered by the Random Quote Generator API from RapidAPI. The application generates random quotes with the click of a button and displays them to the user.
- Random Quote Generation: Clicking the "Generate" button fetches a random quote from the API and displays it to the user.
- Error Handling: Handles errors gracefully and displays error messages if there's an issue fetching the quote.
- Loading State: Displays a loading message while fetching the quote to provide feedback to the user.
- React.js: Utilized for building the user interface and managing state.
- @tanstack/react-query: Used for data fetching and caching with ease.
- Axios: A promise-based HTTP client for making requests to the Random Quote Generator API.
- RapidAPI: Provides access to various APIs, including the Random Quote Generator API used in this project.
Check out the live demo here.
- Clone this repository.
- Install dependencies using
npm install
. - Run the application with
npm start
. - Access the application in your browser at
http://localhost:5173
.