UNPKG

downshift

Version:

🏎 A set of primitives to build simple, flexible, WAI-ARIA compliant React autocomplete, combobox or select dropdown components.

13 lines (12 loc) 510 B
/** * This will perform a shallow merge of the given state object * with the state coming from props * (for the controlled component scenario) * This is used in state updater functions so they're referencing * the right state regardless of where it comes from. * * @param state The state of the component/hook. * @param props The props that may contain controlled values. * @returns The merged controlled state. */ export declare function getState<S extends object>(state: S, props?: Partial<S>): S;