Skip to content

Instantly share code, notes, and snippets.

@jackofseattle
Created May 28, 2015 21:51
Show Gist options
  • Save jackofseattle/e28631e321bdd607200b to your computer and use it in GitHub Desktop.
Save jackofseattle/e28631e321bdd607200b to your computer and use it in GitHub Desktop.
connect to stores as a decorator for flummox
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