javascript - cubiq - IScroll.js | 我应该在哪个方法生命周期中将自定义事件放入 React JS
问题描述
cubiq - IScroll.js
你好,请问一下。我正在开发的 React JS 项目中使用 IScroll.js 库。在库中有一个自定义事件来处理滚轮项目。你可以在这里看到更多:https ://github.com/cubiq/iscroll#onscroll 。
一个例子是滚动/滚动结束。
myScroll = new IScroll('#wrapper', { probeType: 3, mouseWheel: true });
myScroll.on('scroll', updatePosition);
myScroll.on('scrollEnd', updatePosition);
我的问题是在这个 React JS 项目中,我应该将自定义事件放在哪个生命周期方法中。谢谢你。
解决方案
推荐阅读
- c# - 程序集“Microsoft.Owin.Security.OpenIdConnect”与 Microsoft.Owin.Security 不兼容
- c - C中数据类型的大小,最小值和最大值
- graphql - Apollo 如何足够聪明地知道何时合并,但不知道何时添加?
- wpf - 来自后面代码的 WPF 样式不适用
- javascript - 为什么单击我的动态创建的 html 会插入到最后一张循环卡上
- java - 为什么我会收到此错误 访问 stax 流时出错
- javascript - 从前端 fetch() 请求调用时,Express res.redirect() 不会重定向浏览器 URL
- java - 排除 JVM Jar 打开问题
- python - Python 中的 Adobe Acrobat API
- javascript - Laravel 5.6 - 使用 laravel-mix 拆分 vuejs 代码