- Using the ReactJS library
- Using the ReactJS Router library
- Using JSX syntax
- SPA Approach
- Using Redux Toolkit for a global state management
- Fetch API
Hello React Front-End is a React application that displays random greetings fetched from the Rails API endpoint. This project meets the following requirements:
- Create a React app called 'hello-react-front-end'.
- Initialize the project with Git.
- Create the
App
component with react-router. - Create the
Greeting
component that displays a greeting and set it up as a route in theApp
component. - Create a store, an action, and a reducer that connect to your API endpoint to get the random greeting.
- Display the random greeting in your
Greeting
component.
To get the project up and running on your local machine, follow these steps.
This front-end application is designed to work in conjunction with the Hello Rails Back-End project. The back-end project provides a server API, and this front-end application makes requests to http://localhost:3000/api/v2/greetings/random
to fetch random greetings. Ensure that the back-end server is running before using this front-end application.
Before you begin, make sure you have the following prerequisites installed on your system:
- Node.js: You need Node.js to run the React application.
- npm: npm is the package manager for JavaScript and comes with Node.js.
Clone this repository to your desired folder:
git clone https://github.com/hafiz1379/hello-react-front-end.git
cd hello-react-front-end
Install dependencies:
npm install
To run the project, execute the following command:
npm start
π€ Hafizullah Rasa
- GitHub: Hafiz Rasa
- LinkedIn: Hafiz Rasa
- Create the view: All Greetings list
- Add custom CSS styles to the UI
- Deploy the final version of the project and share Link Demo in the documentation
- Create Unit tests using Jest and React testing library
Find a bug or have a feature request? Open a new issue here on GitHub.
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
If you find this project helpful, please consider starring the repository. Your support is greatly appreciated!
This project is licensed under the MIT License - see the LICENSE.md file for details.