github cyclejs/cyclejs v0.20.3
v0.20.3 - Fixes bug #106

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

Fixes bug #106, where you couldn't provide an (mutating) array as props to a custom element, otherwise it wouldn't be recognized as changed to the custom element's implementation. With v0.20.3, in these cases, you should provide the comparer function that calculates whether the two property values are equal or not.

Example:

Cycle.registerCustomElement('x-element', function (rootElem$, props) {
  let vtree$ = props.get('list$', (x, y) => _.isEqual(x, y)).map((list) =>
  h('div', [
    h('ol', list.map((value) => h('li', value)))
  ]));

  rootElem$.inject(vtree$);
});

Notice props.get('list$', (x, y) => _.isEqual(x, y)) using Lo-Dash's isEqual method as the comparer. You can still use the props getter with just the name props.get('list$') and it will use Rx's default comparer, as it was previously to this version.

Don't miss a new cyclejs release

NewReleases is sending notifications on new releases.