Skip to content

v4.0.0

Compare
Choose a tag to compare
@solkimicreb solkimicreb released this 13 Jan 17:58
· 51 commits to master since this release

Breaking changes

  • Removed unqueue, use the observe scheduler option instead with an add and delete method.
  • Removed exec, observe returns a reaction - that you can call directly - instead.
  • Removed observable.$raw, use the raw(observable) function instead to get the raw object.
  • Reactions are executed synchronously on observable mutations by default. You can get back the old behavior by using a custom scheduler option in observe.
  • Removed nextTick, it is not needed anymore in case of synchronous reaction scheduling.

Features

  • Added the raw function, which returns the raw object when an observable is passed to it.
  • Added a second options argument to observe, which can make it lazy or use a custom reaction scheduler.
  • observe returns a reaction function, which is a transparent proxy of the original function. Call this function, instead of exec(fn).

Fixes

  • DOM Nodes won’t throw when they are wrapped by observables.
  • Out of bound array mutations will correctly trigger length observers.
  • Fixed a memory leak in case of very dynamic functions (lots of conditionals and loops).