Skip to content

Flux

dispatcher

  • 维护注册的回调
  • 分发操作到store

store

  • 应用程序状态和逻辑

action

  • 纯声明式的数据结
js
{
  type: 'ADD_TODO',
  payload: {
    text: 'Do something.'  
  }
}
{
  type: 'ADD_TODO',
  payload: {
    text: 'Do something.'  
  }
}

reference

https://github.com/facebook/fluxhttps://facebook.github.io/flux/