Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nidhiupman568/diceroll-using-react.js
๐ Welcome to the Dice Rolling project! ๐ This exciting ๐ฅณ and interactive ๐ฎ application rolls two dice ๐ฒ๐ฒ to display random numbers between 1๏ธโฃ and 6๏ธโฃ. Every time you click the button ๐ฑ๏ธ, the dice shake ๐ and show a new random number ๐ฐ on their upper faces, just like standard dice ๐ฒ.
https://github.com/nidhiupman568/diceroll-using-react.js
css dice-roll font-awesome front-end-development html javascript learning-reactjs reactjs reactjs-developer stateful-components web-development
Last synced: 2 days ago
JSON representation
๐ Welcome to the Dice Rolling project! ๐ This exciting ๐ฅณ and interactive ๐ฎ application rolls two dice ๐ฒ๐ฒ to display random numbers between 1๏ธโฃ and 6๏ธโฃ. Every time you click the button ๐ฑ๏ธ, the dice shake ๐ and show a new random number ๐ฐ on their upper faces, just like standard dice ๐ฒ.
- Host: GitHub
- URL: https://github.com/nidhiupman568/diceroll-using-react.js
- Owner: nidhiupman568
- Created: 2024-07-15T16:29:02.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2024-08-29T06:25:00.000Z (5 months ago)
- Last Synced: 2024-11-11T16:27:08.699Z (2 months ago)
- Topics: css, dice-roll, font-awesome, front-end-development, html, javascript, learning-reactjs, reactjs, reactjs-developer, stateful-components, web-development
- Language: JavaScript
- Homepage: https://dice-roll-nidhiupman-using-react-js.vercel.app/
- Size: 183 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐ฒ Dice Rolling App using ReactJS ๐ฒ
๐ Welcome to the **Dice Rolling** project! ๐ This exciting ๐ฅณ and interactive ๐ฎ application rolls two dice ๐ฒ๐ฒ to display random numbers between **1๏ธโฃ** and **6๏ธโฃ**. Every time you click the button ๐ฑ๏ธ, the dice shake ๐ and show a new random number ๐ฐ on their upper faces, just like standard dice ๐ฒ.
## ๐ Description ๐
The **Dice Rolling App** ๐น๏ธ is a fun and engaging ๐ web application that brings the classic dice rolling experience ๐ฒ to your screen. The app utilizes **ReactJS** โ๏ธ for seamless functionality and **CSS** ๐จ for smooth animations. Each time you roll, the dice display a random number ๐ with standard dot patterns using the **Font Awesome** library ๐จ. Whether youโre playing a game ๐ฒ๐ฏ or just having fun ๐น๏ธ, this app will keep you entertained! ๐
## ๐ ๏ธ Built With ๐ ๏ธ
- **ReactJS** โ๏ธ: The core library for building interactive UIs ๐ป.
- **CSS** ๐จ: For stunning visual effects ๐ and animations โจ.
- **Font Awesome** ๐จ: To display dice dots accurately โชโชโช.## ๐ How to Use ๐
1. **Clone** the repository: `git clone https://github.com/nidhiupman568/DiceRoll-Using-React.JS.git` ๐ฅ๏ธ.
2. **Navigate** to the project directory: `cd dice-rolling-app` ๐.
3. **Install** the necessary dependencies: `npm install` ๐ฆ.
4. **Start** the application: `npm start` ๐.
5. **Open** your browser ๐ and go to: `http://localhost:3000` to see the app in action! ๐ฒ๐## ๐ Project Structure ๐
The project structure ๐๏ธ is organized into **components** ๐งฉ:
- **Die** ๐ฒ: A stateless component that shows a single die with the correct dotted number.
- **RollDice** ๐ฒ๐ฒ: Contains the logic ๐ก to generate random numbers and handle button clicks ๐ฑ๏ธ. This component renders two **Die** components side by side ๐ซ.### ๐งฑ Folder Structure ๐งฑ
```
/dice-roll-app
โ
โโโ /public
โ
โโโ /src
โ โโโ /components
โ โ โโโ Die.js ๐ฅ๏ธ
โ โ โโโ Die.css ๐จ
โ โ โโโ RollDice.js ๐ฅ๏ธ
โ โ โโโ RollDice.css ๐จ
โ โ
โ โโโ App.js ๐ฅ๏ธ
โ โโโ index.js ๐ฅ๏ธ
โ
โโโ package.json ๐ฆ
โโโ README.md ๐
```## ๐ฆ Dependencies ๐ฆ
Here are the key dependencies used ๐:
- **React**: `^18.2.0` โ๏ธ
- **React-DOM**: `^18.2.0` ๐ฅ๏ธ
- **FontAwesome**: `^6.4.0` ๐จ for icons ๐ผ๏ธ.```json
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^6.4.0",
"@fortawesome/free-solid-svg-icons": "^6.4.0",
"@fortawesome/react-fontawesome": "^0.2.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1"
}
```## ๐ธ Screenshots ๐ธ
Here's how the **Dice Rolling App** ๐ฒ looks in action! ๐ท:
![diceroll](https://github.com/user-attachments/assets/6395a98f-2f3e-4e21-84bb-827b001395e4)
๐ผ๏ธ## ๐ Steps to Run the Application ๐
1. **Create** the application using the following command: `npx create-react-app dice-roll` ๐ ๏ธ.
2. **Navigate** to the project folder: `cd dice-roll` ๐.
3. **Install** the required modules ๐ฆ:
```bash
npm i @fortawesome/fontawesome-svg-core
npm i @fortawesome/free-solid-svg-icons
npm i @fortawesome/react-fontawesome
```
4. **Create** a new directory called components ๐ and add the necessary files: `RollDice.js`, `Die.js`, `RollDice.css`, and `Die.css` ๐.
5. **Run** the application using the following command: `npm start` ๐.
6. **Open** your web browser and go to `http://localhost:3000` ๐ to view the Dice Rolling App in action! ๐## ๐ฏ Conclusion ๐ฏ
Thank you for checking out the **Dice Rolling App** ๐ฒ! Feel free to share your feedback ๐ฌ or contribute to the project by making a pull request ๐. Happy coding! ๐ป๐
## ๐ฌ Feedback and Contributions ๐ฌ
Feel free to fork ๐ด this repository and make pull requests ๐. For any issues ๐ ๏ธ or suggestions ๐ก, please open an issue ๐.
# Getting Started with Create React App
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
## Available Scripts
In the project directory, you can run:
### `npm start`
Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.The page will reload when you make changes.\
You may also see any lint errors in the console.### `npm test`
Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.### `npm run build`
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!See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
### `npm run eject`
**Note: this is a one-way operation. Once you `eject`, you can't go back!**
If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
## Learn More
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
To learn React, check out the [React documentation](https://reactjs.org/).
### Code Splitting
This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
### Analyzing the Bundle Size
This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
### Making a Progressive Web App
This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
### Advanced Configuration
This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
### Deployment
This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
### `npm run build` fails to minify
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)