github cyclejs/cyclejs v0.24.0
v0.24 - Cosmetic API improvement

latest releases: unified-tag, v7.0.0, v7.0.0-rc8...
pre-release8 years ago

Small breaking change to improve the API related to driver responses. The getter API was replaced by object properties.

BEFORE

function main(drivers) {
  let vtree$ = drivers.get('DOM', '.target', 'click').flatMap( /* ... */ );
  // ...
}

AFTER

function main(drivers) {
  let vtree$ = drivers.DOM.get('.target', 'click').flatMap( /* ... */ );
  // ...
}

This allows using the drivers argument with ES6 destructuring:

function main({DOM, foo, bar}) {
  let vtree$ = DOM.get('.target', 'click').flatMap( /* ... */ );
  let F$ = foo.delay(1000);
  let B$ = bar.map( /* ... */ ).filter( /* ... */ );
  // ...
}

Given the argument drivers to main(), drivers.driverName will return the output of the driver function denoted by driverName. As you can see from the example above, the output might be a queryable (getable) collection of Observables such as DOM.get(selector, eventType) or simply an Observable, e.g. foo.delay(1000).


Changes to custom element internal drivers:

BEFORE: drivers.get('props', 'children')
AFTER: drivers.props.get('children')

To get all properties:
BEFORE: drivers.get('props', '*') or drivers.get('props')
AFTER: drivers.props.get('*') only

Don't miss a new cyclejs release

NewReleases is sending notifications on new releases.