Pass nonce to children
This commit is contained in:
@ -10,9 +10,9 @@ export default function handleRequest(
|
||||
request: Request,
|
||||
responseStatusCode: number,
|
||||
responseHeaders: Headers,
|
||||
remixContext: EntryContext
|
||||
remixContext: EntryContext & RequestContext
|
||||
) {
|
||||
const cache = createEmotionCache();
|
||||
const cache = createEmotionCache(remixContext.data.nonce);
|
||||
const { extractCriticalToChunks } = createEmotionServer(cache);
|
||||
const html = renderToString(
|
||||
<ServerStyleContext.Provider value={null}>
|
||||
|
Reference in New Issue
Block a user