Created
May 28, 2015 21:51
-
-
Save jackofseattle/e28631e321bdd607200b to your computer and use it in GitHub Desktop.
connect to stores as a decorator for flummox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const React = require('react'); | |
const connectToStores = require('flummox/connect'); | |
function connect(...args) { | |
return function(target) { | |
return connectToStores(target, ...args); | |
} | |
} | |
@connect(['myStore']) | |
class TestComponent extends React.Component { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment