SOURCE

reducer = (state = [] , action) => {
  if(action.type === 'split_string'){
    return action.payload.split('');
  }
  return state;
}

function render(){
  document.querySelector('body').innerHTML = store.getState();
}

var store = Redux.createStore(reducer);
store.subscribe(render);

action = {
  type:'split_string',
  paylaod:'abcd'
}

store.dispatch(action);
console 命令行工具 X clear

                    
>
console