While trying to use NippleJS in React, I am seeing Cannot read property 'getBoundingClientRect' of undefined.
The joystick is in a modal, so the UI element doesn't exist when initializing NippleJS.
Here's my configuration:
componentDidMount = () => {
const joystickParams = {
zone: this.joystick,
mode: 'static',
position: {top: '49.995%', left: '20.625%'}
};
const manager = require('nipplejs').create(joystickParams);
};