React app中的Web组件

时间:2018-03-19 20:21:33

标签: reactjs polymer create-react-app

我在我的反应应用程序(使用Create-react-app创建)中使用了一些基于Polymer构建的自定义Web组件。 到目前为止,我正在使用

加载组件
<link rel="import" href="URL of a git ">

它工作正常。 但是我收到谷歌Chrome的警告:

[Deprecation] Styling master document from stylesheets defined in HTML 
Imports is deprecated, and is planned to be removed in M65, around March 
2018. Please refer to  for possible migration paths.

所以我尝试使用bower安装它们,但我找不到正确导入它们的方法。 我试过:

<link rel="import" href="./bower_components/....">
<link rel="import" href="../bower_components/....">

既然文件在bower_components目录中,我如何在我的反应应用程序中使用它们?我看到一些反应扩展存在,但我没有看到我如何使用这些海关组件。

感谢您的帮助,

0 个答案:

没有答案