@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

1
import Component from "@wazapp/component";
2
import { observable, action } from "@wazapp/tracking";
3
​
4
export default class Todos extends Component {
5
@observable todoItems: []
6
​
7
template() {
8
return (
9
<div>
10
<CreateForm onCreate={this.addTodo} />
11
<TodoList todoItems={this.todoItems} />
12
</div>
13
);
14
}
15
​
16
@action
17
addTodo(todoItem) {
18
this.todoItems.push(todoItem);
19
}
20
}
Copied!
Last modified 1yr ago
Copy link