Releases: buntec/ff4s
v0.15.0
What's Changed
- use requestAnimationFrame in render loop by @buntec in #126 (thanks to @armanbilge )
- Inject store into action handler by @buntec in #127
We've decided to change the signature of the store constructor yet again:
Action => State => (State, Option[F[Option[Action]]])
becomes
Store[F, State, Action] => Action => State => (State, Option[F[Unit]])
.
In other words, the store itself is now available in the builder function, which gives
us access to store.dispatch
to enqueue any number of follow-up actions, and store.state
to track
subsequent state changes. This is strictly more powerful than the previous version.
In particular, we no longer need to encode follow-up actions in the return type of the effect.
Note that for "pure" state updates nothing changes: state => state.copy(foo = 17) -> none
.
Thanks to @ramytanios for helpful discussions!
Full Changelog: v0.14.0...v0.15.0
v0.14.0
What's Changed
state
->store
by @armanbilge in #124- Update cats-effect, cats-effect-kernel, ... to 3.4.10 by @scala-steward in #123
- Experimental/store redesign by @buntec in #125
IMPORTANT: This release introduces a breaking change to the store API. We've replaced Ref[F, State] => Action => F[Unit]
with Action => State => (State, Option[F[Option[Action]]])
. This will break all existing user code but the required changes should be fairly mechanical and confined to the construction of the store. Actions that are pure state updates now take the form state => state.copy(foo = 17) -> none
. Any effect associated with an action (e.g., a REST call) goes into the F[Option[Action]]
bit. If this effect completes with Some(Foo)
, then the Foo
action will subsequently be submitted to the store. (See example6
on how to achieve cancellation of long-running effects using a Supervisor
. )
The motivation for this change is to enforce atomic, strictly ordered state updates. Before, if you
weren't careful, you could end up with a race condition if an action handler contained multiple calls to state.get
, state.set
, state.update
etc., because all actions were running concurrently and a Ref[F, State]
was exposed. In the new model, state updates are clearly atomic, while (long-running) effects are still executed concurrently (and may trigger follow-up actions).
Huge thanks to @armanbilge for fruitful discussions!
Full Changelog: v0.13.0...v0.14.0
v0.13.0
What's Changed
- Some refactoring by @buntec in #122
- Update http4s-dom to 0.2.8 by @scala-steward in #121
- Update sbt-typelevel, ... to 0.4.20 by @scala-steward in #120
Full Changelog: v0.12.0...v0.13.0
v0.12.0
What's Changed
- Update cats-effect, cats-effect-kernel, ... to 3.4.9 by @scala-steward in #119
- Rename
App#root
toApp#view
- Rename
WebSocketsClient
toWebSocketClient
Full Changelog: v0.11.0...v0.12.0
v0.11.0
What's Changed
- Upgrade scala dom types by @buntec in #117
- Update sbt-scalajs, scalajs-compiler, ... to 1.13.1 by @scala-steward in #118
Full Changelog: v0.10.0...v0.11.0
v0.10.0
v0.9.0
Full Changelog: v0.8.0...v0.9.0
v0.8.0
What's Changed
- Update cats-effect, cats-effect-kernel, ... to 3.4.8 by @scala-steward in #110
- Update scalafmt-core to 3.7.2 by @scala-steward in #109
- Update scalajs-dom to 2.4.0 by @scala-steward in #107
- Update http4s-dom to 0.2.7 by @scala-steward in #106
- Update sbt-typelevel to 0.4.19 by @scala-steward in #112
- Update circe-generic, circe-literal, ... to 0.14.5 by @scala-steward in #111
- Feature/io entry point by @buntec in #113
- Update scalafmt-core to 3.7.3 by @scala-steward in #115
Full Changelog: v0.7.0...v0.8.0
v0.7.0
What's Changed
- Update cats-effect, cats-effect-kernel, ... to 3.4.2 by @scala-steward in #87
- Update sbt-scalajs, scalajs-compiler, ... to 1.12.0 by @scala-steward in #86
- Update fs2-dom to 0.1.0 by @scala-steward in #82
- Update sbt to 1.8.0 by @scala-steward in #79
- Update scala3-library, ... to 3.2.1 by @scala-steward in #78
- Update cats-effect, cats-effect-kernel, ... to 3.4.4 by @scala-steward in #89
- Update sbt-typelevel to 0.4.17 by @scala-steward in #83
- Update sbt-typelevel to 0.4.18 by @scala-steward in #92
- Update sbt to 1.8.2 by @scala-steward in #91
- Update http4s-circe, http4s-client to 0.23.17 by @scala-steward in #90
- Update fs2-core to 3.4.0 by @scala-steward in #85
- Update cats-core, cats-free to 2.9.0 by @scala-steward in #80
- Update fs2-core to 3.5.0 by @scala-steward in #93
- Update scalafmt-core to 3.7.0 by @scala-steward in #97
- Update http4s-dom to 0.2.5 by @scala-steward in #98
- Update sbt-scalajs, scalajs-compiler, ... to 1.13.0 by @scala-steward in #101
- Update scalafmt-core to 3.7.1 by @scala-steward in #100
- Update http4s-dom to 0.2.6 by @scala-steward in #99
- Update cats-effect, cats-effect-kernel, ... to 3.4.5 by @scala-steward in #94
- Update http4s-circe, http4s-client to 0.23.18 by @scala-steward in #95
- Update circe-generic, circe-literal, ... to 0.14.4 by @scala-steward in #105
- Update fs2-core to 3.6.1 by @scala-steward in #104
- Update scala3-library, ... to 3.2.2 by @scala-steward in #102
- Update cats-effect, cats-effect-kernel, ... to 3.4.6 by @scala-steward in #103
Full Changelog: v0.6.0...v0.7.0