js: upgrade to MobX 6.0.

This commit is contained in:
evazion
2021-01-27 17:46:17 -06:00
parent 0713751e3c
commit 2eeee446a5
3 changed files with 21 additions and 16 deletions

View File

@@ -1,5 +1,5 @@
import { h, Component, render } from "preact";
import { observable, computed, action } from "mobx";
import { makeObservable, observable, computed, action } from "mobx";
import { observer } from "mobx-react";
import Utility from "./utility";
@@ -10,6 +10,11 @@ export default @observer class TagCounter extends Component {
@observable tagCount = 0;
constructor() {
super();
makeObservable(this);
}
componentDidMount() {
$(this.props.tags).on("input", this.updateCount);
this.updateCount();