preact-compat
preact-compat copied to clipboard
react-visibility-sensor: this.setState is not a function
I want to use react-visibility-sensor but unfortunately I get this error:
@developit do you know what's going on here? I get this message in a loop endless times 🤔
seems like an issue with create-react-class. can you try aliasing that to preact-compat/lib/create-react-class
?
This bug was happening for me as well–I added
create-react-class: 'preact-compat/lib/create-react-class'
to my alias file, and this error went away. Thank you Jason and Christian! 🙇
*
thanks for finding the typo @tiagojsalmeida !
For future reference, the alias is create-react-class
, not react-create-class
"create-react-class": "preact-compat/lib/create-react-class",