Skip to content

Commit 3204adc

Browse files
author
Jason Gao
committed
call renderToString before runnin head hooks so that ssr styles are generated correctly by any css-in-js frameworks
1 parent 88a4ce2 commit 3204adc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/fastify-renderer/src/node/renderers/react/ReactRenderer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,8 @@ export class ReactRenderer implements Renderer {
221221
ReactDOMServer: any,
222222
render: Render<Props>
223223
) {
224-
this.runHeadHooks(bus)
225224
const content = ReactDOMServer.renderToString(app)
225+
this.runHeadHooks(bus)
226226
this.runTailHooks(bus)
227227

228228
return render.document({

0 commit comments

Comments
 (0)