I would like to access screenX for onMouseOver event.
This is the current code:
<h1 ref={textInput => { this.state.textInput = textInput; }}
onMouseMove={this.increaseValue}>Some text here</h1>
Increase value is defined like sp:
increaseValue = (e) => {
console.log(e.screenX,);
}
However I get this error and not sure what it means:
This synthetic event is reused for performance reasons. If you're seeing this, you're accessing the property screenX
on a released/nullified synthetic event. This is set to null. If you must keep the original synthetic event around, use event.persist(). See https://reactjs.org/docs/events.html#event-pooling for more information.