React Rx TodoMVC 示例

使用 React 和 RxJS 实现 TodoMVC。「TodoMVC implementation with React and RxJS」

Github星跟踪图

React Rx TodoMVC Example

TodoMVC implementation built on top of React and RxJS

Running

Simply start a static server on this project folder.

Building

You have to install Browserify then simply run these command :

npm install

this will install all the dependencies and bundle the project sources files.

Implementation

This implementation has been inspired by the React Flux architecture

In this implementation has 3 main parts, a TodoStore, a list of actions contained in TodoActions, and a list of views in the form of React Components.

The TodoStore:

This store exposes 2 streams:

  • todos: An RxJS observable that will contain an up-to-date list of todos.
  • updates: an RxJS Observer that will receive operations to apply on the list of todos, those operations take the form of functions that create a new version of our todos list.

The TodoActions:

A list of Rx Observer that will be exposed to our components, this actions are registered against the updates stream of the TodoStore, and will push new operations into this stream when they receive values.

The Views:

A set of React components that will react to changes in our TodoStores todos stream.
In this implementation state and events handlers are managed in a 'reactive' way through the use of a special RxMixin.

TodoStore.todos --------------> React Components ---- (push value) ---> TodoActions-- + 
Ʌ, +--(apply operation on the todos list) ---TodoStore.updates  <--- (push operations) --+

主要指标

概览
名称与所有者fdecampredon/react-rxjs-todomvc
主编程语言JavaScript
编程语言HTML (语言数: 3)
平台
许可证
所有者活动
创建于2014-04-08 08:46:08
推送于2017-04-18 06:01:17
最后一次提交
发布数0
用户参与
星数341
关注者数12
派生数39
提交数22
已启用问题?
问题数3
打开的问题数2
拉请求数4
打开的拉请求数0
关闭的拉请求数0
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?