定义于:react-pacer/src/async-debouncer/useAsyncDebouncer.ts:11
• TFn extends AnyAsyncFunction
• TSelected = {}
readonly state: Readonly<TSelected>;
readonly state: Readonly<TSelected>;
定义于:react-pacer/src/async-debouncer/useAsyncDebouncer.ts:20
在防抖器状态更改时更新和重新渲染的响应式状态
使用此项代替 debouncer.store.state
readonly store: Store<Readonly<AsyncDebouncerState<TFn>>>;
readonly store: Store<Readonly<AsyncDebouncerState<TFn>>>;
定义于:react-pacer/src/async-debouncer/useAsyncDebouncer.ts:26
如果要读取响应式状态,请使用 debouncer.state 而不是 debouncer.store.state。Store 对象上的状态不是响应式的,因为它没有在内部包装在 useStore hook 中。不过,您可以通过在自己的用法中使用 useStore 来使状态具有响应性。
您的每周 JavaScript 资讯。每周一免费发送给超过 10 万开发者。