MCPcopy Index your code
hub / github.com/reactjs/server-components-demo / refresh

Function refresh

src/framework/router.js:44–56  ·  view source on GitHub ↗
(response)

Source from the content-addressed store, hash-verified

42 }
43
44 function refresh(response) {
45 startTransition(() => {
46 const nextCache = new Map();
47 if (response != null) {
48 const locationKey = response.headers.get('X-Location');
49 const nextLocation = JSON.parse(locationKey);
50 const nextContent = createFromReadableStream(response.body);
51 nextCache.set(locationKey, nextContent);
52 navigate(nextLocation);
53 }
54 setCache(nextCache);
55 })
56 }
57
58 function navigate(nextLocation) {
59 startTransition(() => {

Callers 1

performMutationFunction · 0.85

Calls 1

navigateFunction · 0.85

Tested by

no test coverage detected