preactjs / preact-compat

ATTENTION: The React compatibility layer for Preact has moved to the main preact repo.
http://npm.im/preact-compat
MIT License
949 stars 148 forks source link

react-swipeable-views: We are expecting a valid React Element #487

Closed jpodwys closed 6 years ago

jpodwys commented 6 years ago

While trying to use react-swipeable-views with peact via preact-compat, react-swipeable-views floods my console with We are expecting a valid React Element errors.

react-swipeable-views is using React.isValidElement(child). It seems this call returns false when passed a preact node despite the fact that I'm using preact-compat.

Is this a case preact-compat attempts to solve? Have I don't something wrong? Should I report this issue elsewhere?

Thank you!

jpodwys commented 6 years ago

@developit do you have any insight into this?

developit commented 6 years ago

This is very likely the same root cause as #484 (UglifyJS bug).

jpodwys commented 6 years ago

Thanks for the response! I'll give the suggestion in that issue a try. If it works out then I'll close this issue and watch that one.

developit commented 6 years ago

Just an update - we released Preact 8.3.0, which should fix this issue.

jpodwys commented 6 years ago

Thank you, I should get the update automatically. I'll try removing the other solution.