SOURCE

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

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

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

//render();

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

store.dispatch(action);

//alert(Redux);


console 命令行工具 X clear

                    
>
console