import { observable, AnnotationsMap } from "mobx" import { useState } from "react" export function useLocalObservable>( initializer: () => TStore, annotations?: AnnotationsMap ): TStore { return useState(() => observable(initializer(), annotations, { autoBind: true }))[0] }