react-scroll
Advanced tools
Comparing version 1.7.4 to 1.7.5
@@ -70,4 +70,4 @@ 'use strict'; | ||
var Link = function (_React$Component) { | ||
_inherits(Link, _React$Component); | ||
var Link = function (_React$PureComponent) { | ||
_inherits(Link, _React$PureComponent); | ||
@@ -120,6 +120,2 @@ function Link(props) { | ||
if (this.props.spy) { | ||
_scrollSpy2.default.addStateHandler(this.stateHandler); | ||
} | ||
_scrollSpy2.default.addSpyHandler(this.spyHandler, scrollSpyContainer); | ||
@@ -164,3 +160,3 @@ | ||
return Link; | ||
}(_react2.default.Component); | ||
}(_react2.default.PureComponent); | ||
@@ -197,11 +193,2 @@ var _initialiseProps = function _initialiseProps() { | ||
this.stateHandler = function () { | ||
if (scroller.getActiveLink() !== _this2.props.to) { | ||
if (_this2.state !== null && _this2.state.active && _this2.props.onSetInactive) { | ||
_this2.props.onSetInactive(); | ||
} | ||
_this2.setState({ active: false }); | ||
} | ||
}; | ||
this.spyHandler = function (y) { | ||
@@ -255,4 +242,2 @@ | ||
} | ||
return _scrollSpy2.default.updateStates(); | ||
} | ||
@@ -269,3 +254,2 @@ | ||
} | ||
return _scrollSpy2.default.updateStates(); | ||
} | ||
@@ -272,0 +256,0 @@ }; |
{ | ||
"name": "react-scroll", | ||
"version": "1.7.4", | ||
"version": "1.7.5", | ||
"description": "A scroll component for React.js", | ||
@@ -5,0 +5,0 @@ "main": "modules", |
@@ -19,6 +19,6 @@ ## React Scroll | ||
Checkout examples | ||
> Basic | ||
>> [Live](http://fisshy.github.io/react-scroll-example/basic/index.html) | ||
>> Or | ||
>> [Code](https://github.com/fisshy/react-scroll/blob/master/examples/basic/app.js) | ||
> [Code](https://github.com/fisshy/react-scroll/blob/master/examples/basic/app.js) | ||
```js | ||
$ npm start | ||
``` | ||
@@ -385,2 +385,6 @@ ### Usage | ||
#### Changelog | ||
> 1.7.5 | ||
- Improved performance. | ||
> 1.7.0 | ||
@@ -387,0 +391,0 @@ - Deprecated Helpers.js |
452
99712
2113