我将应用程序迁移到 React 16,并同时更新了一些包。现在,当我运行它时,我收到警告:
Warning: The tag <g> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.
Warning: <foreignObject /> is using uppercase HTML. Always use lowercase HTML tags in React.
Warning: The tag <foreignObject> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.
我使用 SVG 组件来渲染 d3 对象。我正在使用 Chrome 62。应用程序中的任何错误似乎都不能证明这些警告是合理的。有人解释一下吗?
最佳答案
在它们周围添加外部
<svg>
<g />
</svg>
关于reactjs - SVG 组件发出警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47774410/