shekharramola / react-wheel-of-prizes

It is a wheel of prizes game for react developers
89 stars 58 forks source link

How to spin wheel one more time ? #2

Closed subnetsRU closed 3 years ago

subnetsRU commented 3 years ago

First of all, thanks for your work.

I cant understand how to spin wheel one more time with different winningSegment. It`s seems that in render once and thats all. Second click on 'spin' do nothing. How to pass new winningSegment value ... unknown.

Can you help ?

shekharramola commented 3 years ago

@subnetsRU , generally in these type of game, you only have one shot but if you want to run it more than once, you can get the latest version and pass isOnlyOnce={false}

isherwood commented 3 years ago

In v1.0.6 this doesn't seem to be working. I have the component loaded by itself with your default config in a fresh CRA app and it needs a page refresh to spin again.

Thanks for publishing!

shekharramola commented 3 years ago

@isherwood , thanks for pointing. Can you please check the latest version, i.e., v1.0.8 ?

isherwood commented 3 years ago

Seems to be all good now. Thanks!