flow-runtime-mobx
Adds mobx support to flow-runtime.
Why?
Because mobx observables don't pass standard checks like Array.isArray(observableArray)
or observableMap instanceof Map
.
Installation
npm install flow-runtime-mobx
or
yarn add flow-runtime-mobx
Usage
Before you use any observable objects you must register the types:
;;; ; // only need to do this once.
You are now free to use ObservableArray
and ObservableMap
in place of their native
equivalents thoughout your app:
; type Thing = numbers: number; map: Map<string string>;; const thing: Thing = ; console;