All Projects → outwatch → outwatch

outwatch / outwatch

Licence: Apache-2.0 license
The Functional and Reactive Web-Frontend Library for Scala.js

Programming Languages

scala
5932 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to outwatch

Outwatch
A purely functional and reactive UI framework
Stars: ✭ 376 (-15.32%)
Mutual labels:  sbt, rx, frp
purescript-outwatch
A functional and reactive UI framework based on Rx and VirtualDom
Stars: ✭ 33 (-92.57%)
Mutual labels:  rx, frp, virtualdom
reactify
The first and only true Functional Reactive Programming framework for Scala.
Stars: ✭ 77 (-82.66%)
Mutual labels:  rx, frp
Combinerxswiftperformance
A test suite comparing the performance of Combine and RxSwift
Stars: ✭ 154 (-65.32%)
Mutual labels:  rx, frp
Sbt Dynver
An sbt plugin to dynamically set your version from git
Stars: ✭ 243 (-45.27%)
Mutual labels:  sbt
Scala Play React Seed
❄️ Java Play 2.7.x + React seed project with full-fledged build process
Stars: ✭ 180 (-59.46%)
Mutual labels:  sbt
Sbt Doctest
Doctest for scala
Stars: ✭ 171 (-61.49%)
Mutual labels:  sbt
Sbt Docker Compose
Integrates Docker Compose functionality into sbt
Stars: ✭ 168 (-62.16%)
Mutual labels:  sbt
sbt-sonar
An sbt plugin which provides an easy way to integrate Scala projects with SonarQube.
Stars: ✭ 62 (-86.04%)
Mutual labels:  sbt
cfrp
内网穿透,端口转发工具
Stars: ✭ 27 (-93.92%)
Mutual labels:  frp
Paradox
Markdown documentation
Stars: ✭ 229 (-48.42%)
Mutual labels:  sbt
Sbt Web Scalajs
SBT plugin to use Scala.js along with any sbt-web server.
Stars: ✭ 185 (-58.33%)
Mutual labels:  sbt
Ensime Sbt
Generates .ensime config files for SBT projects
Stars: ✭ 244 (-45.05%)
Mutual labels:  sbt
Sbt Crossproject
Cross-platform compilation support for sbt.
Stars: ✭ 176 (-60.36%)
Mutual labels:  sbt
sbt-ghpages
git, site and ghpages support for sbt projects.
Stars: ✭ 94 (-78.83%)
Mutual labels:  sbt
Jitpack.io
Documentation and issues of https://jitpack.io
Stars: ✭ 2,156 (+385.59%)
Mutual labels:  sbt
Sbt Tpolecat
scalac options for the enlightened
Stars: ✭ 227 (-48.87%)
Mutual labels:  sbt
flutter-form-with-validation-BLOC
This form and validation functions are created by using the BLOC pattern with RxDart instead of using StatefulWidget
Stars: ✭ 63 (-85.81%)
Mutual labels:  rx
Reposilite
Lightweight repository management software dedicated for the Maven based artifacts (formerly NanoMaven) 📦
Stars: ✭ 222 (-50%)
Mutual labels:  sbt
Distribution
The Javascript ecosystem for Scala.js!
Stars: ✭ 213 (-52.03%)
Mutual labels:  sbt

Outwatch

The Functional and Reactive Web-Frontend Library for Scala.js

Typelevel incubator codecov Discord outwatch Scala version support

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 and Subject 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, yarn and github-cli (optionally) are installed.

# create new repo on github based on this template
gh repo create my-first-outwatch-project --template outwatch/example --public --clone

# if you want to just get the template locally without creating a github repo:
git clone --depth 1 https://github.com/outwatch/example my-first-outwatch-project

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.6", // zio support
  "com.github.cornerman" %%% "colibri-fs2"       % "0.7.6", // fs2 support
  "com.github.cornerman" %%% "colibri-airstream" % "0.7.6", // sirstream support
  "com.github.cornerman" %%% "colibri-rx"        % "0.7.6", // scala.rx support
  "com.github.cornerman" %%% "colibri-router"    % "0.7.6", // 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 the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].