/Random_Quote_Generator

This repository contains a simple web application built using React.js that generates random quotes with the click of a button. The application utilizes the Random Quote Generator API from RapidAPI to fetch random quotes and display them to the user.

Primary LanguageJavaScript

Random Quote Generator

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.

Features

  • 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.

Technologies Used

  • 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.

Live Demo

Check out the live demo here.

Setup

  1. Clone this repository.
  2. Install dependencies using npm install.
  3. Run the application with npm start.
  4. Access the application in your browser at http://localhost:5173.