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 (get
able) 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