react中 使用loadsh 的debounce 函数 问题

若是你这样写,页面跳转后在回来 会发现 以前的清除监听未能生效;形成重复监听bug;web componentDidMount() { document.addEventListener('keydown', _.debounce(this.handleKeydown)) } componentWillUnmount() { document.removeEventLis
相关文章
相关标签/搜索