-
-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error rendering component with React.Suspense #522
Comments
Hey. I can reproduce your issue locally but there's a twist. If I copy-paste your code into scalajs-react's This suggests to me that it might be an issue with scalajs-bundler or webpack. |
Looking into the emitted JS (by just running val suspenseE = Raw.React.createElement(Raw.Suspense, suspenseP, lazyE) into this: var suspenseE = $i_react.createElement($i_react, suspenseP, lazyE); In other words, for some reason it's passing |
This is because @JSImport("react", JSImport.Namespace, "React.Suspense")
@js.native
object Suspense extends js.Any According to the documentation for the relevant overload of
That means that if compiling for an environment without modules (such as a legacy browser environment) then it's (correctly) interpreted as an alias for I'll send a PR as soon as I've verified that this fixes the issue. |
Fixes japgolly#522, see japgolly#522 (comment) and japgolly#522 (comment) for more details.
Fixes japgolly#522, see japgolly#522 (comment) and japgolly#522 (comment) for more details.
Hmmm, Github closed this when I merged the PR. v1.4.1 is on its way to Maven Central, give it a try and if this problem persists, please re-open this. |
Thanks! |
Got an error with
React.Suspense
(React 16.7.0). Am I missing something?Browser stack trace:
Replication repo: https://github.com/allantl/scalajs-react-suspense
The text was updated successfully, but these errors were encountered: