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