how to insert dynamic html in the page?
Unanswered
Chinese Alligator posted this in #help-forum
Chinese AlligatorOP
i'm trying to make it work with
i'm using
parser from html-react-parser module but what i'm getting the error:Unhandled Runtime Error
Error: Hydration failed because the initial UI does not match what was rendered on the server.
Warning: Expected server HTML to contain a matching <p> in <p>.
See more info here: https://nextjs.org/docs/messages/react-hydration-errori'm using
getServerSideProps in this page since i read stuff from database into the component. my code goes as following: https://pastebin.com/4JTsXk3N and the component that uses parser: https://pastebin.com/WWXCnDAr where article.contents hold a string with the HTML1 Reply
Chinese AlligatorOP
by now i'm using this https://traviswimer.com/blog/error-hydration-failed-because-the-initial-ui-does-not-match-what-was-rendered-on-the-server/ but i think it's hacky. if anyone knows a more appropriated, "elegant" approach, please, let me know