Skip to content

Commit

Permalink
Merge pull request #25 from WestCoast5550/patch-3
Browse files Browse the repository at this point in the history
fix 100 to make it work
  • Loading branch information
sudheerj authored Jul 17, 2019
2 parents 22428d7 + 0d67098 commit 649a8fd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2021,6 +2021,11 @@
```javascript
class WindowDimensions extends React.Component {
constructor(props){
super(props);
this.updateDimensions = this.updateDimensions.bind(this);
}

componentWillMount() {
this.updateDimensions()
}
Expand All @@ -2034,7 +2039,7 @@
}

updateDimensions() {
this.setState({width: $(window).width(), height: $(window).height()})
this.setState({width: window.innerWidth, height: window.innerHeight})
}

render() {
Expand Down

0 comments on commit 649a8fd

Please sign in to comment.