0

Producing slot machine effect with react

Hey everyone, could someone maybe give me a couple of tips how do I create slot machine effect with react with no libraries? I've tried using useEffect and setTimeot and setInterval, but Its not what Ive expected. How do we create something like this as smooth as possible and displaying 3 units vertically per row? Whats the logic behind recreating slot machine effect? Ty in advance

5th Dec 2020, 11:11 PM
Tadas
Tadas - avatar
2 Answers
0
You want display 3 units vertically for row when for example run a function? If Is that. You can create a component for the single units like a container and import it on father component for three times. In the father component you can implement the Logic. For example you have an Array With N elements. And onClick you run a random function that return an Array element. For do that you must to pass props father to child component
6th Dec 2020, 1:20 PM
Alessio Farroni
Alessio Farroni - avatar
0
Sky Crown Bonuses https://sky-crown.io/mobile/ provide Australian players with fantastic opportunities to boost their bankroll. From generous welcome bonuses to ongoing promotions, there’s something for everyone. These bonuses can be used on a variety of games, including pokies and table games. Loyalty rewards and VIP perks further enhance the experience. Don’t miss the chance to maximize your wins with Sky Crown Bonuses!
14th Jan 2025, 9:54 AM
vlad petruchevich
vlad petruchevich - avatar