Description
First you will need to install Java and SBT if you haven't already. Create a new SBT project and add the ScalaJS plugin to your plugins.sbt. Then add the following line to your build.sbt.
OutWatch alternatives and similar packages
Based on the "Reactive Web Frameworks" category.
Alternatively, view OutWatch alternatives based on common mentions on social networks and blogs.
-
Calico
Calico is a UI library for the Typelevel.js ecosystem. It leverages the abstractions provided by Cats Effect and FS2 to provide a fluent DSL for building web applications that are composable, reactive, and safe. If you enjoy working with Cats Effect and FS2 then I hope that you will like Calico as well.
SaaSHub - Software Alternatives and Reviews
Do you think we are missing an alternative of OutWatch or a related project?
README
Outwatch
The Functional and Reactive Web-Frontend Library for Scala.js
import outwatch._
import outwatch.dsl._
import colibri._
import cats.effect.{IO, IOApp}
object Main extends IOApp.Simple {
override def run = {
val counter = Subject.behavior(0)
val myComponent = div(
button("+", onClick(counter.map(_ + 1)) --> counter),
counter,
)
Outwatch.renderReplace[IO]("#app", myComponent)
}
}
In Outwatch, you can describe your whole web application without doing any side effect - you only run your application when rendering it.
- Write UI-components using pure functions
- Manage state in a referentially transparent way using cats-effect
- Built-in lightweight
Observable
andSubject
types from colibri - Seamlessly works with existing reactive programming libraries: ZIO, fs2, Airstream, scala.rx
- Low-boilerplate, many convenient helper functions
- Built on top of snabbdom, a virtual dom library
You will find interactive examples and explanations in our documentation.
Documentation
Quickstart
Template
The quickest way to play with outwatch is to use our template.
Make sure that java
, sbt
, nodejs
and yarn
are installed.
sbt new outwatch/seed.g8
In your newly created project directory, run:
sbt dev
and point your browser to http://localhost:12345.
Manual setup
Add the scalajs
and scalajs-bundler
plugins to your project/plugins.sbt
:
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.x.x")
addSbtPlugin("ch.epfl.scala" % "sbt-scalajs-bundler" % "x.x.x")
Add the outwatch dependencies to your build.sbt
:
enablePlugins(ScalaJSPlugin)
enablePlugins(ScalaJSBundlerPlugin)
resolvers += "jitpack" at "https://jitpack.io"
val outwatchVersion = "<latest outwatch version>"
libraryDependencies ++= Seq(
"io.github.outwatch" %%% "outwatch" % outwatchVersion,
// optional dependencies:
"com.github.cornerman" %%% "colibri-zio" % "0.7.1", // zio support
"com.github.cornerman" %%% "colibri-fs2" % "0.7.1", // fs2 support
"com.github.cornerman" %%% "colibri-airstream" % "0.7.1", // sirstream support
"com.github.cornerman" %%% "colibri-rx" % "0.7.1", // scala.rx support
"com.github.cornerman" %%% "colibri-router" % "0.7.1", // Url Router support
)
Bugs and Feedback
For bugs, questions and discussions please use GitHub Issues.
Community
We adopted the Scala Code of Conduct. People are expected to follow it when discussing Outwatch on the Github page, Gitter channel, or other venues.
LICENSE
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
https://www.apache.org/licenses/LICENSE-2.0
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.
*Note that all licence references and agreements mentioned in the OutWatch README section above
are relevant to that project's source code only.