Skip to content

Instantly share code, notes, and snippets.

@goldensunliu
Created May 12, 2016 17:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save goldensunliu/f7a4252d74aa41a38f8448237caa0628 to your computer and use it in GitHub Desktop.
Save goldensunliu/f7a4252d74aa41a38f8448237caa0628 to your computer and use it in GitHub Desktop.
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