p5.js-web-editor/shared/redux/reducers/ide.js

18 lines
308 B
JavaScript
Raw Normal View History

2016-05-11 20:13:17 +00:00
import * as ActionTypes from '../constants/constants';
const initialState = {
isPlaying: false
}
const ide = (state = initialState, action) => {
switch (action.type) {
case ActionTypes.TOGGLE_SKETCH:
return {
isPlaying: !state.isPlaying
}
default:
return state
}
}
export default ide;