react-with-styles icon indicating copy to clipboard operation
react-with-styles copied to clipboard

Adds failing test for flushBefore in SSR

Open goatslacker opened this issue 7 years ago • 0 comments

It seems like flushBefore calls ThemedStyleSheet.flush(); during render which is also executed on the server. If a component that uses SSR has the flushBefore option set then their component will fail to server render because Aphrodite can't automatically buffer without a document.

I recommend we add an environment check before we flush just to make sure the document is available.

goatslacker avatar Jan 05 '18 22:01 goatslacker