Skip to content

v3.1.0 Lifecycle observables

Compare
Choose a tag to compare
@pH200 pH200 released this 10 Dec 11:10
· 53 commits to master since this release

Breaking change: applyToDOM and makeDOMDriver are both removed. Use ReactDOM.render instead.

BEFORE

Cycle.applyToDOM('.js-container', function computer() {
  return Rx.Observable.just(<h3>view</h3>);
});

AFTER

const MyElement = Cycle.component('MyElement', function computer() {
  return Rx.Observable.just(<h3>view</h3>);
});
ReactDOM.render(<MyElement />, document.querySelector('.js-container'));

Deprecated: Deprecated bindThis option with the function as view.

Add feature: Support lifecycle events by the fourth parameter lifecycles for the component's definitionFn. [#18]

See Working with React - Lifecycle events for details.