-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
oe[n] is undefined #119
Comments
Could you please provide the code and more information regarding this issue ? |
I'm seeing the same issue. Using:
Here's my code: export default () => {
const Wheel = dynamic(
() => import("react-custom-roulette").then((mod) => mod.Wheel),
{ ssr: false }
);
const data = [
{ option: '0' },
{ option: '1' },
{ option: '2' },
]
const [mustSpin, setMustSpin] = useState(false);
const [prizeNumber, setPrizeNumber] = useState(0);
const handleSpinClick = () => {
if (!mustSpin) {
const newPrizeNumber = Math.floor(Math.random() * data.length);
setPrizeNumber(newPrizeNumber);
setMustSpin(true);
}
}
return (
<>
<Wheel
mustStartSpinning={mustSpin}
prizeNumber={prizeNumber}
data={data}
onStopSpinning={() => {
setMustSpin(false);
}}
/>
<button onClick={handleSpinClick}>SPIN</button>
</>
);
}; Using the hack required to get this working with NextJS: #57 |
U are genious |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tried to implement it on next, react 18 and react 17 but keeps throwing error oe[n] is undefined.
The text was updated successfully, but these errors were encountered: