japgolly / scalajs-react

Facebook's React on Scala.JS
https://japgolly.github.io/scalajs-react/
Apache License 2.0
1.64k stars 231 forks source link

[WIP] Support React Refresh #1069

Open japgolly opened 2 years ago

japgolly commented 2 years ago

Closes #1061

japgolly commented 2 years ago

Have just run into https://github.com/lampepfl/dotty-feature-requests/issues/307 on the Scala 3 side. This is effectively a blocker because workarounds would need to be applied at call-site (i.e. users' code). Worse is that there's no way to detect when we're running up against this bug; it will just silently generate incorrect code. 🤢

japgolly commented 2 years ago

Note to self: add as JS RR test with custom hooks to confirm how it's handled in plain JS

japgolly commented 2 years ago

Reminder: Try again to reproduce the Scala 3 lazy val bug now that I fiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiinally know it's related to betaReduction

japgolly commented 2 years ago

Create a Scala.js issue to elide those useless props.a; statements

Edit: Done. Raised https://github.com/scala-js/scala-js/issues/4692