import { useCallback } from 'react';

const useStateSliceSetter = (setState, key)=>{
    return useCallback((value)=>{
        setState((state)=>{
            return {
                ...state,
                [key]: value
            };
        });
    }, [
        key,
        setState
    ]);
};

export { useStateSliceSetter };
//# sourceMappingURL=useStateSliceSetter.mjs.map
