This is a simple web application built using React and TypeScript that fetches random quotes from an API and allows users to hear the quote spoken aloud.
- Random Quotes: Fetches quotes from [API_NAME] to display on the app.
- Text-to-Speech: Provides a button to hear the quote read aloud using browser text-to-speech functionality.
- React and TypeScript: Built with React framework using TypeScript for strict typing.
-
Clone the repository:
git clone https://github.com/your-username/quote-generator.git
-
Navigate to the project directory:
cd quote-generator
-
Install dependencies:
npm install
-
Obtain an API key from [API_PROVIDER] and replace
[YOUR_API_KEY]
insrc/api.ts
with your actual API key. -
Start the development server:
npm start
-
Open your browser and navigate to
http://localhost:3000
to view the app. -
Click the "Generate Quote" button to fetch a random quote. Press the "Listen" button to hear the quote spoken aloud.
- React: JavaScript library for building user interfaces.
- TypeScript: Typed superset of JavaScript for enhanced code quality.
This app uses the (https://api.adviceslip.com/advice) API to fetch random quotes. For more information.