import { ScopedModel } from '../create-model'; import { Compare } from '../utils/comparer'; export declare type SelectorFn = (model: Readonly) => R; /** * Transforms the model's state and listens for the returned value change. * * If the value changes, the component re-renders. * * uses the `Object.is` function for comparison by default. * * @param model the scoped model to read the state from * @param selector a function that receives the model state * and transforms it into a new value. * @param shouldUpdate a function that compares the * previously transformed value to the newly transformed value * and if it should replace the previous value and perform an update. */ export default function useSelector(model: ScopedModel, selector: SelectorFn, shouldUpdate?: Compare): R;