MCPcopy
hub / github.com/nytimes/react-tracking / handleAsyncAction

Function handleAsyncAction

src/__tests__/hooks.test.js:935–944  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

933 const { trackEvent } = useTracking();
934
935 const handleAsyncAction = async () => {
936 const value = await Promise.resolve(message);
937 trackEvent({
938 label: 'async action',
939 status: 'success',
940 value,
941 });
942
943 return value;
944 };
945
946 const executeAction = async () => {
947 const data = await handleAsyncAction();

Callers 1

executeActionFunction · 0.85

Calls 1

trackEventFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…