Skip to content

v5.0.0

Compare
Choose a tag to compare
@davidgilbertson davidgilbertson released this 15 Mar 08:16
· 94 commits to master since this release

Version 5 brings a major change to the way the Recollect store works, making it almost identical in behaviour to a normal JavaScript object (the only difference being that the Recollect store is immutable under the hood).

New stuff

  • It should now be impossible to read from the 'wrong' store. You can refer to the Recollect store via props.store in a collected component, or import {store} from 'react-recollect'. Previously, attempts to read from the imported store inside a collected component was an error. This also means you no longer need to pass props.store to a selector.

Breaking changes

  • The prevStore property has been removed from the event passed to an afterChange callback. If you would like to compare to the previous store, you will need to track this yourself.
  • Any code that relied on (or worked around) the Recollect store behaving differently to a plain JS object will probably break.

Fixed

  • #71 - sorting in Node.js 10 was unpredictable
  • #83 - getting a reference to an object in the store, then deleting its parent would make that object unreachable.
  • Generally, any behaviour where the Recollect store exhibited different behaviour to a plain JavaScript object should now be gone.