MCPcopy
hub / github.com/facebook/react / useOptimistic

Function useOptimistic

packages/react-server/src/ReactFizzHooks.js:593–599  ·  view source on GitHub ↗
(
  passthrough: S,
  reducer: ?(S, A) => S,
)

Source from the content-addressed store, hash-verified

591}
592
593function useOptimistic<S, A>(
594 passthrough: S,
595 reducer: ?(S, A) => S,
596): [S, (A) => void] {
597 resolveCurrentlyRenderingComponent();
598 return [passthrough, unsupportedSetOptimisticState];
599}
600
601function createPostbackActionStateKey(
602 permalink: string | void,

Callers 9

TodoItemFunction · 0.90
Page.jsFile · 0.90
ReactFiberHooks.jsFile · 0.50
AppFunction · 0.50
AppFunction · 0.50
SiblingFunction · 0.50

Calls 1

Tested by 3

AppFunction · 0.40
AppFunction · 0.40
SiblingFunction · 0.40