This is a simple web application built with React that fetches random advice from the Adviceslip API and displays it on the screen. It allows users to fetch new advice by clicking a button.
- Fetches random advice from the Adviceslip API.
- Displays the fetched advice on the screen.
- Allows users to fetch new advice by clicking a button.
This project is deployed on Netlify. You can access the deployed version here.
- React.js
- Axios for making HTTP requests
- Pure CSS for styling
To get a local copy of the project up and running on your machine, follow these steps:
- Clone the repository to your local machine: (
git clone https://github.com/Siddharth263/advice-react-app.git
) - Navigate to the project directory: (
cd react-advice-app
) - Install the dependencies: (
npm install
) - Start the development server: (
npm start
) - Open your web browser and visit (
http://localhost:3000
) to view the app.
- Once the app is running, you will see a random piece of advice displayed on the screen.
- To fetch new advice, click the "GIVE ME ADVICE!" button.
If you'd like to contribute to this project, please follow these guidelines:
- Fork the repository.
- Create a new branch (
git checkout -b feature/my-new-feature
). - Make your changes and commit them (
git commit -am 'Add some feature'
). - Push your changes to the branch (
git push origin feature/my-new-feature
). - Create a new Pull Request.
- Thanks to the Adviceslip API for providing the random advice data.