I have been attempting to segregate my parameters from my JSX within the react-particles-js library. I organize my parameters in an Object:
let config = {
"particles": {
"number": {
"value": 50
},
"size": {
"value": 3
}
},
"interactivity": {
"events": {
"onhover": {
"enable": true,
"mode": "repulse"
}
}
}
}
Next, I implement my JSX:
<Particles configuration={config}/>
However, upon doing so, I encounter the following error message:
The types of 'interactivity.events.onhover.mode' are incompatible between these types.
Type 'string' is not assignable to type '"repulse" | "grab" | "push" | "remove" | "bubble" | InteractivityMode[] | undefined'. TS2322
Unfortunately, I am unable to import the InteractivityMode interface as it is not exported in the library. I'm at a loss for what steps to take next.