@fruits-chain/react-native-xiaoshu
Version:
🌈 React Native UI library
9 lines • 370 B
TypeScript
type UpdateStateParam<T> = Partial<T> | ((s: T) => Partial<T>);
type UpdateState<T> = (p: UpdateStateParam<T>) => void;
/**
* useState 类似 this.setState 可以传入部分字段更新
* @param state 状态
*/
declare const useStateUpdate: <T>(state: T | (() => T)) => [T, UpdateState<T>];
export default useStateUpdate;
//# sourceMappingURL=useStateUpdate.d.ts.map