Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Release 0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fomkin committed Feb 19, 2017
1 parent bae798a commit a6764a8
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ Our project supports static page rendering, so that search engines can index pag
Add `korolev-server` to your `build.sbt`

```scala
libraryDependencies += "com.github.fomkin" %% "korolev-server-blaze" % "0.1.0"
libraryDependencies += "com.github.fomkin" %% "korolev-server-blaze" % "0.2.0"
```

Look at [examples](https://github.com/fomkin/korolev/tree/v0.1.0/examples). It updates very frequently, so we don't paste the code here, sorry guys.
Look at [examples](https://github.com/fomkin/korolev/tree/v0.2.0/examples). It updates very frequently, so we don't paste the code here, sorry guys.

## Architecture

Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ val publishSettings = Seq(
val commonSettings = publishSettings ++ Seq(
scalaVersion := "2.11.8", // Need by IntelliJ
organization := "com.github.fomkin",
version := "0.2.0-SNAPSHOT",
version := "0.2.0",
libraryDependencies ++= Seq(
"org.scalatest" %%% "scalatest" % "3.0.1" % "test"
),
Expand Down
26 changes: 26 additions & 0 deletions korolev/src/main/scala/korolev/Effects.scala
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,33 @@ object Effects {
def apply[F[+_]: Async, S, M] = new Effects[F, S, M]()

abstract class Access[F[+_]: Async, M] {

/**
* Extract property of element from client-side DOM.
* @param propName Name of property. 'value for example
* @see [[Effects.elementId]]
* @example
* {{{
* eventWithAccess('click) { access =>
* deferredTransition {
* for {
* request <- access.property[String]('value, searchField)
* result <- searchModel.search(request)
* } yield {
* transition {
* case state: State.Awesome =>
* state.copy(list = searchResult)
* }
* }
* }
* }
* }}}
*/
def property[T](id: ElementId, propName: Symbol): F[T]

/**
* Publish message to environment
*/
def publish(message: M): F[Unit]
}

Expand Down

0 comments on commit a6764a8

Please sign in to comment.