You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using Prismic.io as a CMS and am fetching this data in getInitialProps(). The content is pre-formatted as HTML so I'm using dangerouslySetInnerHTML.
Expected Behavior
The output of render() is identical when executed on the server and on the client.
Actual Behavior
The output of render() on the server is wrong and doesn't match the client.
Render from server:
Render from client
The difference is the content doesn't have the proper style on the server because the DOM nodes are not nested properly.
@flybayer thanks for reporting. I could be wrong but passing your sith through an HTML validator gives me this errorhttps://validator.w3.org/nu/?doc=https%3A%2F%2Fthefaithnet-ynikfpghwu.now.sh%2F I think is because in HTML nesting p tags is not valid. Can you try using a div instead of the outer p?
Background
I'm using Prismic.io as a CMS and am fetching this data in
getInitialProps()
. The content is pre-formatted as HTML so I'm usingdangerouslySetInnerHTML
.Expected Behavior
The output of
render()
is identical when executed on the server and on the client.Actual Behavior
The output of
render()
on the server is wrong and doesn't match the client.Render from server:
Render from client
The difference is the content doesn't have the proper style on the server because the DOM nodes are not nested properly.
DOM from the server:
DOM from the client:
Relevant Code
and
More Info
This deployment and
/_src
are public here: https://thefaithnet-ynikfpghwu.now.sh/The text was updated successfully, but these errors were encountered: