Skip to content

Releases: buntec/ff4s

v0.15.0

10 May 12:44
Compare
Choose a tag to compare

What's Changed

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

08 May 10:11
94a865f
Compare
Choose a tag to compare

What's Changed

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

27 Apr 16:38
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.12.0...v0.13.0

v0.12.0

23 Apr 12:54
Compare
Choose a tag to compare

What's Changed

  • Update cats-effect, cats-effect-kernel, ... to 3.4.9 by @scala-steward in #119
  • Rename App#root to App#view
  • Rename WebSocketsClient to WebSocketClient

Full Changelog: v0.11.0...v0.12.0

v0.11.0

15 Apr 18:37
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.10.0...v0.11.0

v0.10.0

07 Apr 16:34
570a01f
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.9.0...v0.10.0

v0.9.0

03 Apr 18:07
Compare
Choose a tag to compare

Full Changelog: v0.8.0...v0.9.0

v0.8.0

02 Apr 09:47
982a5ae
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.7.0...v0.8.0

v0.7.0

14 Feb 09:01
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.6.0...v0.7.0

v0.6.0

07 Nov 10:02
Compare
Choose a tag to compare

Adds basic routing support.

Thanks to @armanbilge for creating fs2-dom.