UNPKG

@td-design/rn-hooks

Version:

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

11 lines (10 loc) 379 B
interface Actions<T> { setLeft: () => void; setRight: () => void; set: (value: T) => void; toggle: () => void; } declare function useToggle<T = boolean>(): [boolean, Actions<T>]; declare function useToggle<T>(defaultValue: T): [T, Actions<T>]; declare function useToggle<T, U>(defaultValue: T, reverseValue: U): [T | U, Actions<T | U>]; export default useToggle;