Hey! I'm on a mission to learn react. I'll be posting series of mini-react projects likes this regularly.
This is a basic accordion app where we have a list of questions and we can toggle the answers also as the user toggles the answer the icon changes inside the button,This was built with React, Html and CSS.
This project was bootstrapped with Create React App.
Below you will find some information on how to perform common tasks.
Before you begin, ensure you have met the following requirements:
- Git must be installed on your operating system.
To install, follow these steps:
Linux and macOS:
sudo git clone https://github.com/chukshon/React-mini-project_Basic-accordion.git
Windows:
git clone https://github.com/chukshon/React-mini-project_Basic-accordion.git
After creation, your project should look like this:
React-mini-project_Basic-accordion/
node_modules/
public/
index.html
favicon.ico
logo192.png
logo512.png
manifest.json
robots.txt
src/
App.js
data.js
index.css
index.js
Question.js
package-lock.json
package.json
README.md
For the project to build, these files must exist with exact filenames:
public/index.html
is the page template;src/index.js
is the JavaScript entry point
In the project directory, you can run:
This command installs a package and any packages that it depends on. If the package has a package-lock;
import { FaHome } from 'react-icons/fa';
const Component = () => {
return <FaHome className='icon'></FaHome>;
};
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
This project is free to use and does not contains any license.