Skip to content

๐ŸŽ‰ 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 ๐ŸŽฒ.

Notifications You must be signed in to change notification settings

nidhiupman568/DiceRoll-Using-React.JS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฒ 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 ๐Ÿ–ผ๏ธ.
"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 ๐Ÿ–ผ๏ธ

๐Ÿ“š 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 ๐Ÿ“ฆ:
    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.

Available Scripts

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open 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 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 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.

To learn React, check out the React documentation.

Code Splitting

This section has moved here: 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

Making a Progressive Web App

This section has moved here: 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

Deployment

This section has moved here: 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

About

๐ŸŽ‰ 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 ๐ŸŽฒ.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published