Phani-LP/React_JS_Projects
A collection of beginner-friendly React JS projects showcasing various concepts and functionalities in React development.
React JS Projects
This repository contains a collection of React-based projects, each showcasing different functionalities and concepts in React development. Below is a structured overview of the projects, setup instructions, and usage details.
Table of Contents
Projects Overview
This repository includes the following React projects, each designed to demonstrate specific React concepts and features:
- HelloWorld: A basic "Hello World" component to introduce React rendering.
- CounterAPP: A counter application with increment and decrement functionality.
- SimpleForms: A form to collect and display user input (name, email, message).
- ToDoListApp: A to-do list application for adding and removing tasks.
- RandomQuoteGeneratorApp: A random quote generator using the Quotable API.
- SimpleCalculator: A basic calculator with keyboard input support.
- WeatherApp: A weather display app using the OpenWeatherMap API.
- RockPaperScissors: A Rock-Paper-Scissors game against the computer.
Getting Started
Follow these steps to set up the repository locally:
-
Clone the repository:
git clone https://github.com/your-username/react-js-projects.git cd react-js-projects -
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Open the application:
Navigate tohttp://localhost:5173in your browser.
Project Descriptions
HelloWorld
- File:
src/HelloWorld.jsx - Description: A simple React component that displays "Hello World".
- Usage: Uncomment the
HelloWorldcomponent insrc/main.jsxto render it.
CounterAPP
- File:
src/App1.jsx - Description: A counter application with buttons to increment and decrement a count.
- Usage: Uncomment the
CounterAPPcomponent insrc/main.jsxto render it.
SimpleForms
- File:
src/SimpleForms.jsx - Description: A form to collect user input (name, email, message) and display the submitted data.
- Usage: Uncomment the
SimpleFormscomponent insrc/main.jsxto render it.
ToDoListApp
- File:
src/ToDoList.jsx - Description: A to-do list application for adding and removing tasks.
- Usage: Uncomment the
ToDoListAppcomponent insrc/main.jsxto render it.
RandomQuoteGeneratorApp
- File:
src/randomQuoteGeneratorApp.jsx - Description: Fetches and displays random quotes from the Quotable API.
- Usage: Uncomment the
RandomQuoteGeneratorAppcomponent insrc/main.jsxto render it.
SimpleCalculator
- File:
src/simplecalculator.jsx - Description: A basic calculator supporting addition, subtraction, multiplication, and division with keyboard input.
- Usage: Uncomment the
SimpleCalculatorcomponent insrc/main.jsxto render it.
WeatherApp
- File:
src/weatherApp.jsx - Description: Displays weather data for a specified location using the OpenWeatherMap API.
- Usage:
- Uncomment the
DisplayWeathercomponent insrc/main.jsxto render it. - Replace
API_KEYin the file with your OpenWeatherMap API key.
- Uncomment the
RockPaperScissors
- File:
src/Game.jsx - Description: A Rock-Paper-Scissors game where the user competes against the computer.
- Usage: Uncomment the
RockPaperScissorscomponent insrc/main.jsxto render it.
Styling
The projects use the following CSS files for consistent and responsive styling:
- Global Styles:
src/index.css - Calculator Styles:
src/calculatorstyle.css - Game Styles:
src/game.css
Additionally, Bootstrap is integrated for uniform styling across components.
Running the Projects
-
Start the development server:
npm run dev
-
Access the application:
Openhttp://localhost:5173in your browser. -
Switch between projects:
- Navigate to
src/main.jsx. - Uncomment the desired project component and comment out others to render it.
- Navigate to
Note: Ensure you have an active internet connection for projects that rely on external APIs (e.g., WeatherApp, RandomQuoteGeneratorApp).