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

Function useData

fixtures/ssr2/src/data.js:30–38  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28];
29
30export function useData() {
31 const ctx = useContext(DataContext);
32 if (ctx !== null) {
33 // This context is only provided on the server.
34 // It is here to simulate a suspending data fetch.
35 ctx.read();
36 }
37 return fakeData;
38}

Callers 2

Comments.jsFile · 0.90

Calls 1

useContextFunction · 0.90

Tested by

no test coverage detected