Created
May 12, 2016 17:08
-
-
Save goldensunliu/f7a4252d74aa41a38f8448237caa0628 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const StyleSheetServer = { | |
async renderStatic(appRenderFunc) { | |
reset(); | |
startBuffering(); | |
const result = await appRenderFunc(); | |
const cssContent = flushToString(); | |
return { | |
result, | |
css: { | |
content: cssContent, | |
renderedClassNames: getRenderedClassNames(), | |
}, | |
}; | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment