[英]How to use jQuery.stellar in React
How do I have to configure my React project to be able to use the code below: 我必须如何配置我的React项目才能使用以下代码:
$(window).stellar()
I'm using Webpack and ProviderPlugin, and design is ready - only thing left is to install and attach Stellar library 我正在使用Webpack和ProviderPlugin,并且设计已经准备就绪-剩下的就是安装并附加Stellar库
To use jquery with React, here is as sample code: 要将jQuery与React一起使用,下面是示例代码:
import $ from 'jquery';
... // here goes class definition and constructor
componentDidMount() {
$(window).stellar()
}
componentWillUnmount() {
$(window).stellar("destroy");
}
I hope this helps. 我希望这有帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.