Closed nicolas-cusan closed 3 years ago
Hello @retyui sorry for the late reply,
I just added a new commit, there now is a SSR check outside the component, _body
, _html
and document
are set conditionally as props and state
is no longer used. Doing the check in componentDidMount
does not work as it is not called during SSR.
Hello @retyui thank you for the great library!
I am using it with a next.js project and needed SSR support for that. What I did:
<style>
tag for css instead of appending to<head>
to prevent DOM references.document
andwindow
inside the component and initialize incomponentDidMount
usingstate
Thank you!