-
Notifications
You must be signed in to change notification settings - Fork 79
Open
Description
Not having standard safe implicits is a barrier to using scalarx with scalajs. Below are links to several implementations people have come up with. It would be nice to have some standard implicits that we could refer to and that the community could improve over time.
Observations:
- The Hands on Scalajs book has a recommended implicit that needs to be updated asap.
- Some people's implicits use .toTry and get values safely, some do not
- Some people implicits wrap the rx value in a container node, making it easy to remove all child nodes. However adding these intermediate nodes doesn't work well when using libraries like bootstrap. (example Voltir/framework)
- I am not sure how to combine safety, being sure to remove/replace all children, and not creating a container node that messes up bootstrap css/js.
Implementations:
- https://github.com/Karasiq/scalajs-bootstrap/blob/master/src/main/scala/com/karasiq/bootstrap/BootstrapImplicits.scala#L132-156
- https://github.com/openmole/scaladget/blob/master/scaladget/src/main/scala/fr/iscpif/scaladget/tools/JsRxTags.scala#L39-61
- https://github.com/Voltir/framework.rx/blob/master/src/main/scala/framework/Framework.scala#L20-49
- https://github.com/lihaoyi/hands-on-scala-js/blob/master/examples/demos/src/main/scala/advanced/BasicRx.scala#L68-L79
Metadata
Metadata
Assignees
Labels
No labels