import { autorun, runInAction } from 'mobx';
import { useEffect, useState } from 'react';
// https://github.com/mobxjs/mobx/discussions/2566#discussioncomment-593670
export function useSelector(select) {
    const [selected, setSelected] = useState(() => runInAction(select));
    useEffect(() => autorun(() => setSelected(select())), []);
    return selected;
}
//# sourceMappingURL=useSelector.js.map