silverwolf-x's picture
download
raw
1.27 kB
'use client'
import { useSyncExternalStore } from 'react'
const reactServerRequestsServerSnapshot: never[] = []
const ServerRequestsStore = {
subscribe:
typeof window === 'undefined'
? () => () => {}
: window.reactServerRequests.subscribe,
getSnapshot:
typeof window === 'undefined'
? () => []
: window.reactServerRequests.getStoreSnapshot,
getServerSnapshot: () => reactServerRequestsServerSnapshot,
}
export function ReactServerRequests() {
const reactServerRequests = useSyncExternalStore(
ServerRequestsStore.subscribe,
ServerRequestsStore.getSnapshot,
ServerRequestsStore.getServerSnapshot
)
return (
<>
<p>{reactServerRequests.length} Server Request entries</p>
<ol>
{reactServerRequests.map((request, index) => (
<li key={index}>
<details>
<summary>
<strong>
{request.type}: {request.name || '<Unnamed>'}
</strong>
({Math.round(request.startTime)}ms–
{Math.round(request.endTime)}ms)
</summary>
<pre>{JSON.stringify(request.properties, null, 2)}</pre>
</details>
</li>
))}
</ol>
</>
)
}

Xet Storage Details

Size:
1.27 kB
·
Xet hash:
cf842e6764ae08333db576591295cc57b1802e8bb1366eb00bebe665c85e9ffb

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.