Add responsive reducer

This commit is contained in:
Colin Megill
2018-02-28 10:03:19 -08:00
parent 1825f289b7
commit 8b587da713
+16
View File
@@ -0,0 +1,16 @@
const Responsive = (state = {
width: null,
height: null,
}, action) => {
switch (action.type) {
case "resize event":
return Object.assign({}, state, {
width: action.data,
height: action.data
});
default:
return state;
}
};
export default Responsive;