Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-window-decorators

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-window-decorators - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

.nvmrc

10

CHANGELOG.md
# Changelog
### v1.0.7
28.09.2020.
**Fixed**
* Moved event bindings to `componentDidMount` to fix `Can't call setState on a component that is not yet mounted` error. It might help with [Plx issue #60](https://github.com/Stanko/react-plx/issues/60) as well.
-----
### v1.0.6

@@ -4,0 +14,0 @@

8

lib/scroll.js

@@ -47,5 +47,3 @@ 'use strict';

// Bind events
_this.handleScrollChange = _this.handleScrollChange.bind(_this);
window.addEventListener('window-scroll', _this.handleScrollChange);
}

@@ -63,2 +61,8 @@

_createClass(ScrollDecorator, [{
key: 'componentDidMount',
value: function componentDidMount() {
// Bind events
window.addEventListener('window-scroll', this.handleScrollChange);
}
}, {
key: 'componentWillUnmount',

@@ -65,0 +69,0 @@ value: function componentWillUnmount() {

@@ -55,6 +55,2 @@ 'use strict';

state.isTouchDevice = _this.windowManager.isTouchDevice();
// Bind events
_this.handleWindowResize = _this.handleWindowResize.bind(_this);
window.addEventListener('window-resize', _this.handleWindowResize);
}

@@ -67,2 +63,9 @@

_createClass(WindowDecorator, [{
key: 'componentDidMount',
value: function componentDidMount() {
// Bind events
this.handleWindowResize = this.handleWindowResize.bind(this);
window.addEventListener('window-resize', this.handleWindowResize);
}
}, {
key: 'componentWillUnmount',

@@ -69,0 +72,0 @@ value: function componentWillUnmount() {

{
"name": "react-window-decorators",
"version": "1.0.6",
"version": "1.0.7",
"private": false,

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -19,5 +19,3 @@ import React, { Component } from 'react';

// Bind events
this.handleScrollChange = this.handleScrollChange.bind(this);
window.addEventListener('window-scroll', this.handleScrollChange);
}

@@ -33,2 +31,7 @@

componentDidMount() {
// Bind events
window.addEventListener('window-scroll', this.handleScrollChange);
}
componentWillUnmount() {

@@ -35,0 +38,0 @@ // Remove and reset interval/animationFrame

@@ -27,6 +27,2 @@ import React, { Component } from 'react';

state.isTouchDevice = this.windowManager.isTouchDevice();
// Bind events
this.handleWindowResize = this.handleWindowResize.bind(this);
window.addEventListener('window-resize', this.handleWindowResize);
}

@@ -37,2 +33,8 @@

componentDidMount() {
// Bind events
this.handleWindowResize = this.handleWindowResize.bind(this);
window.addEventListener('window-resize', this.handleWindowResize);
}
componentWillUnmount() {

@@ -39,0 +41,0 @@ // Remove and reset interval/animationFrame

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc