JPCui / jpcui.github.io

0 stars 0 forks source link

react-ssr-无法渲染dangerouslySetInnerHTML | RushGo #35

Open JPCui opened 2 years ago

JPCui commented 2 years ago

https://rushgo.wiki/architecture/react-ssr-cannot-render-a-alone-dev-with-dangerouslySetInnerHTML/

问题描述当需要在后端渲染html富文本时,发现如果 dangerouslySetInnerHTML 存在于一个独立的

标签里时,会渲染出一个空的
解决办法在该
标签外,再套一层
before: 12345