alt-connect

1.0.6 • Public • Published

alt-connect

connect mixin for alt store

Features

  • auto connect your stores
  • use displayName as namespace

Examples

import React, { PropTypes } from 'react'
import connect from 'alt-connect'
 
@connect(Store1, Store2)
class App extends React.Component {
    componentWillMount() {
        //listen
        super.componentWillMount()
 
        //do something
        Actions1.get()
    }
    componentWillUnmount() {
        //unlisten
        super.componentWillUnmount()
        //do something
    }
    componentDidMount() {
        super.componentDidMount()
 
        Actions2.get();
    }
    render () {
        return (
            <div>app</div>
        )
    }
}
 
export default App;

Package Sidebar

Install

npm i alt-connect

Weekly Downloads

696

Version

1.0.6

License

MIT

Last publish

Collaborators

  • jackong