dustin-H/bauhaus-ui

View on GitHub
src/actions/responsive.js

Summary

Maintainability
A
0 mins
Test Coverage
import * as types from '../constants/ActionTypes.js'
import store from '../store/store.js'

window.onresize = function(e) {
  store.dispatch(changeWidth(window.innerWidth))
}

export function changeWidth(width) {
  return {
    type: types.RESPONSIVE_CHANGE_WIDTH,
    width
  }
}