Skip to content
This repository has been archived by the owner on Apr 25, 2021. It is now read-only.

Commit

Permalink
Merge pull request #21 from rradczewski/master
Browse files Browse the repository at this point in the history
Add window to README
  • Loading branch information
AlecAivazis committed Apr 18, 2016
2 parents 7806665 + 1c1d67b commit 94cdb34
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ ReactDOM.render(
)

// calculate the initial state
store.dispatch(calculateResponsiveState())
store.dispatch(calculateResponsiveState(window))

```

Expand Down
14 changes: 6 additions & 8 deletions src/actions/creators/calculateResponsiveState.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@ import {CALCULATE_RESPONSIVE_STATE} from '../types'
* `CALCULATE_RESPONSIVE_STATE`, and will be directly given the two keys taken
* from the `window` argument.
*/
export default ({innerWidth, innerHeight, matchMedia} = {}) => {
return {
type: CALCULATE_RESPONSIVE_STATE,
innerWidth,
innerHeight,
matchMedia,
}
}
export default ({innerWidth, innerHeight, matchMedia} = {}) => ({
type: CALCULATE_RESPONSIVE_STATE,
innerWidth,
innerHeight,
matchMedia,
})

0 comments on commit 94cdb34

Please sign in to comment.