Skip to content

Commit

Permalink
Merge branch 'resizeobserver'
Browse files Browse the repository at this point in the history
  • Loading branch information
maslianok committed Feb 25, 2018
2 parents 143bd71 + 8b0194d commit f5d6a2a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
11 changes: 1 addition & 10 deletions examples/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,6 @@ class App extends Component {
count: 0,
};

componentDidMount() {
setTimeout(() => {
console.log('CHANGE!');
this.setState({
handleWidth: true,
});
}, 10000);
}

onResize = () => this.setState({ count: this.state.count + 1 });

hideLeftPanel = () => this.setState({ leftPanel: !this.state.leftPanel });
Expand All @@ -60,7 +51,7 @@ class App extends Component {

<div style={s.text}>Main div resized {this.state.count} times</div>

<ResizeDetector handleWidth={this.state.handleWidth} skipOnMount onResize={this.onResize} />
<ResizeDetector handleWidth handleHeight skipOnMount onResize={this.onResize} />
</div>
</div>
);
Expand Down
1 change: 0 additions & 1 deletion lib/components/ResizeDetector.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ var ResizeDetector = function (_PureComponent) {
value: function render() {
var _this2 = this;

console.log('RENDER');
return _react2.default.createElement('div', {
style: styles,
ref: function ref(el) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"author": "Vitalii Maslianok <[email protected]> (https://github.com/maslianok)",
"version": "1.1.0",
"version": "2.0.0",
"bugs": {
"url": "https://github.com/maslianok/react-resize-detector/issues"
},
Expand Down

0 comments on commit f5d6a2a

Please sign in to comment.