first commit
This commit is contained in:
9
frontend/node_modules/rc-util/es/hooks/useSyncState.d.ts
generated
vendored
Normal file
9
frontend/node_modules/rc-util/es/hooks/useSyncState.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
type Updater<T> = T | ((prevValue: T) => T);
|
||||
export type SetState<T> = (nextValue: Updater<T>) => void;
|
||||
/**
|
||||
* Same as React.useState but will always get latest state.
|
||||
* This is useful when React merge multiple state updates into one.
|
||||
* e.g. onTransitionEnd trigger multiple event at once will be merged state update in React.
|
||||
*/
|
||||
export default function useSyncState<T>(defaultValue?: T): [get: () => T, set: SetState<T>];
|
||||
export {};
|
||||
Reference in New Issue
Block a user