-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
slinky-native scala 3 support? #569
Comments
Ah, this is due to the React Native bindings using the |
This is the only Scala 3 issue I've found open and I'd like to clarify: is this the minimal example on how to compile a component with Slinky in Scala 3 and react (native)?: package example
import example.app.App
import org.scalajs.dom
import org.scalajs.dom.document
import slinky.core.FunctionalComponent
import slinky.core.facade.{React, ReactElement}
import slinky.web.ReactDOM
import slinky.web.html.{div, h1}
import scala.scalajs.js
import scala.scalajs.js.annotation.JSImport
@main
def Example(): Unit = {
ReactDOM.render(App.component(App.Props()), dom.document.getElementById("root"))
} where App is: package example.app
import slinky.core.FunctionalComponent
import slinky.web.html.h1
object App {
case class Props()
val component = FunctionalComponent[Props] { props =>
h1(s"Hello, slinky!")
}
}
Would be great if there's a more succinct approach, like still being able to achieve |
Yep, unfortunately for now there's no way to get the nice |
How should Update
Super simple! So instead of |
This is a good point. For now we could just make Then again, I've been considering deprecating the React Native bindings entirely in favor of ScalablyTyped ones, which are more up to date and work across Scala 2/3. |
Another big Scala3 feature yet to be supported: Currently if you try to
As a best effort, I still use |
ouch! Just hit a very hard to catch incompatibility with Scala3: the So be sure to always define |
I'm just dipping my toes into Scala(js) and I'm interested in using slinky since I have an existing large react-native app and Typescript is torturous to write and maintain. It looks like there are no artifacts available for slinky-native on scala 3 however. Is this intended?
The text was updated successfully, but these errors were encountered: