Skip to content
This repository has been archived by the owner on May 19, 2023. It is now read-only.

TypeError: undefined is not an object (evaluating '_this.props.options.rewards') #41

Open
AslamSymsafe opened this issue Sep 22, 2022 · 1 comment

Comments

@AslamSymsafe
Copy link

i have installed this module and applied the example code getting error undefined is not an object (evaluating '_this.props.options.rewards')

const participants = [
'%10',
'%20',
'%30',
'%40',
'%50',
'%60',
'%70',
'%90',
'FREE',
];
const wheelOptions = {
rewards: participants,
knobSize: 50,
borderWidth: 5,
borderColor: '#000',
innerRadius: 50,
duration: 4000,
backgroundColor: 'transparent',
textAngle: 'horizontal',
// knobSource: require('../assets/knob.png'),
getWinner: (value, index) => {
this.setState({winnerValue: value, winnerIndex: index});
},
onRef: ref => (this.child = ref),
};

return (

)

@KrishEnacton
Copy link

 <WheelOfFortune wheelOptions={wheelOptions} options={wheelOptions} />

Pass wheelOptions in "options" props

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants