import outwatch.dom._ import outwatch.dom.dsl._ import monix.execution.Scheduler.Implicits.global OutWatch.renderInto("#app", h1("Hello World")).unsafeRunSync()
You can find more examples and features in the changelog: CHANGELOG.md
For a quick start, install
yarn and use the following g8 template:
sbt new outwatch/seed.g8
In your newly created project folder, run:
and point your browser to http://localhost:8080.
Changes to the code will trigger a recompile and automatically refresh the page in the browser.
nodejs, if you haven't already.
Create a new SBT project and add the ScalaJS and Scala-js-bundler plugin to your
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.23") addSbtPlugin("ch.epfl.scala" % "sbt-scalajs-bundler" % "0.13.0")
Then add the outwatch dependency to your
libraryDependencies += "io.github.outwatch" %%% "outwatch" % "1.0.0-RC2"
If you are curious and want to try the state of the current
master branch, add the following instead:
resolvers += "jitpack" at "https://jitpack.io" libraryDependencies += "com.github.outwatch" % "outwatch" % "master-SNAPSHOT"
There is a PR with a corresponding changelog which also serves as documentation with examples: https://github.com/OutWatch/outwatch/blob/changelog/CHANGELOG.md
Three main goals of OutWatch
- Updating DOM efficiently without sacrificing abstraction => Virtual DOM
- Handling subscriptions automatically
- Removing or restricting the need for Higher Order Observables
Bugs and Feedback
For bugs, questions and discussions please use the Github Issues.
We adopted the Typelevel Code of Conduct. People are expected to follow it when discussing OutWatch on the Github page, Gitter channel, or other venues.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.