Skip to content

v1.0.0

Choose a tag to compare

@jameshopkins jameshopkins released this 15 May 22:14
· 16 commits to master since this release

New

True cursor immutability

The previous way of ensuring that update transactions from derived cursors act on the root data store has been completely replaced. The method formerly used (inclusion of a 'live' reference to the root data, to allow each cursor the ability to directly modify it), meant that mutations are leaked throughout the system.

Instead, an instantiation of a Clojure-inspired atom sits above the system, with reference to it's mutative method within each cursor. This ensures that the only mutations in the entire system are within the root atom, thus ensuring that the cursors themselves stay immutable.

Breaking changes

  • The scope of the 'on-change' handler to modify the root atom through it's return value has been removed completely.
  • The arguments passed to the 'on-change' handler have changed. Previously they were newState, prevState, keyPath; they're now prevState, nextState.

Updates

  • Bumped immutable to 3.7.6