import { useEffect } from "react";
import { autorun, IAutorunOptions } from "mobx";

export function useAutorun(f: () => void, opts?: IAutorunOptions) {
    useEffect(() => autorun(f, opts), []);
}
