0.0.8 • Published 7 years ago

redux-riot v0.0.8

Weekly downloads
7
License
MIT
Repository
github
Last release
7 years ago

redux-riot

npm version travis build

A Riot integration to Redux

Installation

npm install --save redux-riot

Dependencies

redux-riot depends on redux, riot.

How to use?

Configure and setup the mixin

import Riot from 'riot'
import RiotReduxMixin from 'redux-riot';
import {createStore} from 'redux';

const store = createStore(
    // ...
)

Riot.mixin(RiotReduxMixin(store)) // install globally
Riot.mixin('redux', RiotReduxMixin(store)) // or shared

Use in your tags

    // Initialize the mixin
    // (skip this if the mixin is installed globally)
    this.mixin('redux')

    // Subscribe to state changes (reselect is supported)
    this.subscribe( (state) => state.some )
    this.subscribe( require('./selector'))
    this.subscribe( require('./selector'), callback )

    // Bind actions to this.actions
    this.actions( require('./actions') )

    // Use binded actions
    this.actions.select('payload')

License

This project is licensed under the MIT license, Copyright (c) 2017 Kirill Klenov. For more information see LICENSE.md.

Acknowledgements

Dan Abramov for Redux and Riot team for Riot. A Simple and elegant component-based UI library

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago

0.0.0

7 years ago