All Projects → TalkingData → Rxloop

TalkingData / Rxloop

Licence: mit
rxloop = Redux + redux-observable (Inspired by dva)

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Rxloop

redrock
Typesafe, reactive redux
Stars: ✭ 14 (-68.18%)
Mutual labels:  rxjs, rx
arcomage-hd
Web-based, free and open source, remastered 3D clone of 3DO/NWC's 2000 card game Arcomage. 13 languages. Desktop or mobile Android iOS. Online or offline PWA. Against AI or Multiplayer (w/o server). 🧝👾🃏 (ts+react+redux+rxjs, CSS-based anim, WebRTC)
Stars: ✭ 55 (+25%)
Mutual labels:  redux-observable, rxjs
mst-effect
💫 Designed to be used with MobX-State-Tree to create asynchronous actions using RxJS.
Stars: ✭ 19 (-56.82%)
Mutual labels:  redux-observable, rxjs
ts-action-operators
TypeScript action operators for NgRx and redux-observable
Stars: ✭ 34 (-22.73%)
Mutual labels:  redux-observable, rxjs
axios-for-observable
A RxJS wrapper for axios, same api as axios absolutely
Stars: ✭ 13 (-70.45%)
Mutual labels:  rxjs, rx
vuse-rx
Vue 3 + rxjs = ❤
Stars: ✭ 52 (+18.18%)
Mutual labels:  rxjs, rx
data-flow
frontend data flow explored in React
Stars: ✭ 19 (-56.82%)
Mutual labels:  redux-observable, rxjs
Rxios
A RxJS wrapper for axios
Stars: ✭ 119 (+170.45%)
Mutual labels:  rxjs, rx
RacJS
implementation of RAC(OC) on JavaScript and replacement of RxJS
Stars: ✭ 13 (-70.45%)
Mutual labels:  rxjs, rx
react-redux-observables-boilerplate
Starter kit for React with Router, Redux, Observable + RxJS
Stars: ✭ 89 (+102.27%)
Mutual labels:  redux-observable, rxjs
Rxjs Websockets
A very flexible and simple websocket library for rxjs
Stars: ✭ 248 (+463.64%)
Mutual labels:  rxjs, redux-observable
Tydux
Type safe state management for web applications
Stars: ✭ 33 (-25%)
Mutual labels:  rxjs, flux-architecture
Stuhome
📱 An iOS client for https://bbs.uestc.edu.cn/ written in react-native, redux and redux-observable.
Stars: ✭ 241 (+447.73%)
Mutual labels:  rxjs, redux-observable
react-rxjs-flux
a small library for creating applications based on unidirectional data flow
Stars: ✭ 22 (-50%)
Mutual labels:  flux-architecture, rxjs
Redux Most
Most.js based middleware for Redux. Handle async actions with monadic streams & reactive programming.
Stars: ✭ 137 (+211.36%)
Mutual labels:  rxjs, redux-observable
react-workshops
Online react workshops
Stars: ✭ 36 (-18.18%)
Mutual labels:  flux-architecture, redux-observable
Rx React Container
Use RxJS in React components, via HOC or Hook
Stars: ✭ 105 (+138.64%)
Mutual labels:  rxjs, rx
Types First Ui
An opinionated framework for building long-lived, maintainable UI codebases
Stars: ✭ 114 (+159.09%)
Mutual labels:  rxjs, redux-observable
React-Redux-Enterprise
A React-Redux boilerplate for enterprise/large scaled web applications
Stars: ✭ 77 (+75%)
Mutual labels:  redux-observable, rxjs
Toy Rx
A tiny implementation of RxJS that actually works, for learning
Stars: ✭ 290 (+559.09%)
Mutual labels:  rxjs, rx

简体中文 | English

rxloop NPM version npm download Build Status codecov status license

rxloop = Redux + redux-observable.

基于 RxJS 的可预测状态管理容器,超轻量级的 “redux + redux-observable” 架构。

特性

  • elm 概念:通过 reducers、pipes 组织 model,支持多状态或单一状态树;
  • 易学易用:仅有五个 api,对 Redux、RxJS 用户友好;
  • 插件机制:比如 @rxloop/loading 可以自动处理 loading 状态,@rxloop/devtools 可视化状态树,便于代码调试;
  • 扩展 RxJS:rxloop 能够串联到 RxJS 数据管道之中,最终能够分发出多个数据管道。

安装

rxjs 需要作为 peer dependency 引入。

通过 npm 方式:

$ npm install @rxloop/core rxjs

或者 yarn 方式

$ yarn add @rxloop/core rxjs

快速上手

import rxloop from '@rxloop/core';

// 在一个应用创建一个全局唯一的 app
const store = rxloop();

// 在应用中,可以创建多个业务模型,比如下面的 user 和 counter 模型
store.model({
  name: 'user',
  state: { name: 'wxnet' }
});

store.model({
  name: 'counter',
  state: {
    counter: 0,
  },
  reducers: {
    inc(state) {
      return {
        ...state,
        counter: state.counter + 1
      };
    },
    dec(state) {
      return {
        ...state,
        counter: state.counter - 1
      };
    },
  },
});

// 在 View 层订阅 counter 模型的状态
// 当模型状态变更时,使用 View 层框架相关方法同步 View 的更新,比如 React 的 setState 方法
store.stream('counter').subscribe((state) => {
  // this.setState(state);
});

// 在 view 层,可以通过 dispatch 方法派发 action
// action 会经由 pipes 或 reducers 更新 model 状态
store.dispatch({
  type: 'counter/inc',
});

store.dispatch({
  type: 'counter/inc',
});

store.dispatch({
  type: 'counter/dec',
});

集成

  1. 与 Vue 集成
  2. 与 React 集成

插件

Plugins NPM
immer immer
loading immer
devtools immer

更多示例

  1. 基本的计数器
  2. 单一状态和多状态树
  3. 错误处理
  4. 取消异步请求
  5. 使用 react-rxloop 绑定 react 和 rxloop
  6. 任务列表应用
  7. loading 插件
  8. immer 插件

文档索引

协议许可

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].