Links
Comment on page

@wazapp/tracking

Wazapp is using MobX for state management. It re-exports its functionality as well as observer from mobx-react.
Please Note! For convenience purpose MobX's action has been re-exported as action.bound

Example of usage

import Component from "@wazapp/component";
import { observable, action } from "@wazapp/tracking";
export default class Todos extends Component {
@observable todoItems: []
template() {
return (
<div>
<CreateForm onCreate={this.addTodo} />
<TodoList todoItems={this.todoItems} />
</div>
);
}
@action
addTodo(todoItem) {
this.todoItems.push(todoItem);
}
}