MCPcopy
hub / github.com/mobxjs/mobx / constructor

Method constructor

packages/mobx-react/__tests__/observer.test.tsx:845–849  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

843 inc = () => this.counter++
844
845 constructor(props) {
846 super(props)
847 makeObservable(this)
848 setTimeout(() => this.inc(), 300)
849 }
850
851 render() {
852 return <p>{this.counter}</p>

Callers

nothing calls this directly

Calls 2

makeObservableFunction · 0.90
incMethod · 0.45

Tested by

no test coverage detected