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