是否可以从 ReactComponentB 渲染 HTML?
Is it possible to render HTML from a ReactComponentB?
我有一个现有的 HTML 页面,我已将其转录为 ReactComponentB 对象中的 scalajs-react scalatags,但输出与原始 HTML 略有不同。有没有一种方法可以从 ReactComponentB 中渲染出 HTML,以便我可以将它与我原来的 HTML 进行比较?
听起来 React.renderToStaticMarkup()
就是您要找的东西。
我有一个现有的 HTML 页面,我已将其转录为 ReactComponentB 对象中的 scalajs-react scalatags,但输出与原始 HTML 略有不同。有没有一种方法可以从 ReactComponentB 中渲染出 HTML,以便我可以将它与我原来的 HTML 进行比较?
听起来 React.renderToStaticMarkup()
就是您要找的东西。