@wazapp/tracking
v0.11.2
Published
Tracking functionality
Downloads
18
Readme
@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);
}
}