All Projects → bsideup → Rx Connect

bsideup / Rx Connect

Licence: mit
Glue your state and pure React components with RxJS

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Rx Connect

redrock
Typesafe, reactive redux
Stars: ✭ 14 (-83.72%)
Mutual labels:  flux, reactive, rxjs, rx
Rxviz
Rx Visualizer - Animated playground for Rx Observables
Stars: ✭ 1,471 (+1610.47%)
Mutual labels:  reactive, rxjs, rx
Toy Rx
A tiny implementation of RxJS that actually works, for learning
Stars: ✭ 290 (+237.21%)
Mutual labels:  reactive, rxjs, rx
Tanok
Elm Architecture-inspired wrapper for Rx.js+React
Stars: ✭ 22 (-74.42%)
Mutual labels:  rxjs, flux
Reaktive
Kotlin multi-platform implementation of Reactive Extensions
Stars: ✭ 760 (+783.72%)
Mutual labels:  reactive, rx
Ngx Restangular
Restangular for Angular 2 and higher versions
Stars: ✭ 787 (+815.12%)
Mutual labels:  reactive, rxjs
Xreact
reactive x react = xreact
Stars: ✭ 565 (+556.98%)
Mutual labels:  reactive, rxjs
Dugong
Minimal State Store Manager for React Apps using RxJS
Stars: ✭ 10 (-88.37%)
Mutual labels:  reactive, rxjs
Scalecube Services
v2.0 - ScaleCube Services provides a low latency Reactive Microservices library for serverless service registry and discovery based on gossip protocol and without single point-of-failure or bottlenecks.
Stars: ✭ 23 (-73.26%)
Mutual labels:  reactive, flux
Sheldon
Type-safe reactive preferences for Android
Stars: ✭ 34 (-60.47%)
Mutual labels:  reactive, rx
Inferno Most Fp Demo
A demo for the ReactJS Tampa Bay meetup showing how to build a React+Redux-like architecture from scratch using Inferno, Most.js, reactive programmning, and various functional programming tools & techniques
Stars: ✭ 45 (-47.67%)
Mutual labels:  reactive, rxjs
Frint
Modular JavaScript framework for building scalable and reactive applications
Stars: ✭ 608 (+606.98%)
Mutual labels:  reactive, rxjs
Reactive.how
Learn reactive programming with animated cards.
Stars: ✭ 592 (+588.37%)
Mutual labels:  rxjs, rx
Push State
Turn static web sites into dynamic web apps.
Stars: ✭ 16 (-81.4%)
Mutual labels:  reactive, rxjs
Reatom
State manager with a focus of all needs
Stars: ✭ 567 (+559.3%)
Mutual labels:  reactive, flux
Platform
Reactive libraries for Angular
Stars: ✭ 7,020 (+8062.79%)
Mutual labels:  reactive, rxjs
Rxloop
rxloop = Redux + redux-observable (Inspired by dva)
Stars: ✭ 44 (-48.84%)
Mutual labels:  rxjs, rx
Audio player flutter
🎧 Apple Music / Tidal Audio Player for Flutter
Stars: ✭ 52 (-39.53%)
Mutual labels:  reactive, rx
Android Okgraphql
Reactive GraphQl client for Android
Stars: ✭ 64 (-25.58%)
Mutual labels:  reactive, rx
Outwatch
A purely functional and reactive UI framework
Stars: ✭ 376 (+337.21%)
Mutual labels:  reactive, rx

RxConnect

Gitter NPM version Build Status license

RxConnect is like Redux's @connect, but with all the power of RxJS.

npm install --save rx-connect

Documentation

You can find the latest documentation here: http://bsideup.gitbooks.io/rxconnect/content/

Why?

Replace this:

class Timer extends React.Component {

    constructor(props) {
        super(props);

        this.state = {
            counter: 0
        }
    }

    componentWillMount() {
        this.intervalRef = setInterval(
            () => this.setState(state => ({ counter: state.counter + 1 })),
            1000
        )
    }

    componentWillUnmount() {
        clearInterval(this.intervalRef)
    }

    render() {
        return <div>{ this.state.counter }</div>
    }
}

with this:

import { rxConnect } from "rx-connect";

@rxConnect(
    Rx.Observable.timer(0, 1000).timestamp()
)
class Timer extends React.PureComponent {
    render() {
        return <div>{ this.props.value }</div>
    }
}

NB: We use decorators, but it's not required. These two code blocks are completely identical:

@rxConnect(...)
export class MyView extends React.Component {
    // ...
}

and

class MyView extends React.Component {
   // ...
}
export rxConnect(...)(MyView)

Using RxJS 4?

This library supports RxJS 5 by default, but provides an adapter for RxJS 4:

import { rxConnect } from "rx-connect";
import rx4Adapter from "rx-connect/lib/rx4Adapter";
rxConnect.adapter = rx4Adapter;
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].