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