Open AslamSymsafe opened 2 years ago
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 (
)
<WheelOfFortune wheelOptions={wheelOptions} options={wheelOptions} />
Pass wheelOptions in "options" props
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 (
)