UNPKG

@td-design/rn-hooks

Version:

从ahooks里面抽取的一些在rn项目里可以使用的hooks。提高开发效率

19 lines (18 loc) 439 B
type Options = { min?: number; max?: number; }; export type ValueParam = number | ((c: number) => number); /** * 步进器效果 * @param initialValue * @param options * @returns */ export default function useCounter(initialValue?: number, options?: Options): readonly [number, { inc: (delta?: number) => void; dec: (delta?: number) => void; set: (value: ValueParam) => void; reset: () => void; }]; export {};