Ignore this error ==> The client-side rendered virtual DOM tree is not matching server-rendered content

271 views Asked by At

How to perform a full force rehydration ? This happens all the time when there's a if clause for which I use the variable to lazy request only on client side . It stops the entire client side app running(Hydrating) on Production when it encounters this error !

I need it do a Full Re-Hydration on the app if it is ever necessary Just Like in development mode which works perfectly fine! Note that on elements without the data-server-rendered attribute, hydration can also be forced by passing true to the hydrating argument of $mount

1

There are 1 answers

4
Collin Allen On

You can avoid the error by doing one of:

  • Adjusting your markup so that the error doesn't happen. I've seen this error when rendering <table>s without a <thead> and <tbody>. Adding the missing markup can fix the issue.
  • Wrapping your affected markup with <client-only> to purposely render a tag or component only on client-side