An Interest In:
Web News this Week
- April 17, 2024
- April 16, 2024
- April 15, 2024
- April 14, 2024
- April 13, 2024
- April 12, 2024
- April 11, 2024
Project : Coin Flipper & Color Boxes | Day 9
Coin Flipper
create a coin flipping counter.
The user should be able to click on a button to flip a coin. Every time the user clicks, the coin gets flipped again. The app should also keep track of how many times heads and tails have shown up.
Before building anything,think about the structure of your React app.Dont build this application with a single component: think about how to break your app up into at least two separate components!
Heres some inspiration:
If youd like, get creative and come up with your own coin faces! If you want to use the same coin as I did, you can find the images here:
Heads:https://tinyurl.com/react-coin-heads-jpg
Tails: https://tinyurl.com/react-coin-tails-jpg
Code
https://github.com/Developer-io-web/Coin-Flipper
Color Boxes
For this part, you should show a series of 16 boxes (a box is just square div with a background color).
Initially, each box should have a background color chosen from a random list of colors.
When you click any box:
- it should change its color to adifferentrandom color.
Heres some inspiration:
Code
https://github.com/Developer-io-web/Color-Boxes
Happy Coding !
Original Link: https://dev.to/developerioweb/coin-flipper-color-boxes-day-9-4h3
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To