I am trying to use slot machine in react but when I try use this I get an following error:
./node_modules/react-slot-machine-gen/src/react-slot-machine.js
SyntaxError: C:Projectnode_modulesreact-slot-machine-gensrcreact-slot-machine.js: Support for the experimental syntax 'jsx' isn't currently enabled (38:7):
36 | render() {
37 | return (
> 38 | <div id={this.props.id} className="slot-machine" ref="wrapper"></div>
| ^
39 | );
40 | }
41 | };
Add @babel/preset-react (https://git.io/JfeDR) to the 'presets' section of your Babel config to enable transformation.
If you want to leave it as-is, add @babel/plugin-syntax-jsx (https://git.io/vb4yA) to the 'plugins' section to enable parsing.
And simple react code
import SlotMachine from "react-slot-machine-gen";
<div className={styles.page_container}>
<SlotMachine reels={reels} play={play}/>
<input type="text"/>
<button onClick={() => {
setPlay(true);
}}>Play
</button>
</div>
Information above does not solve this problem.
Thank you, any help will be appreciated