fluxxor
fluxxor copied to clipboard
Can one use Fluxxor with React Native?
I'm noob....to reactjs and react native....but wanted to start using Fluxxor with them both.
Can fluxxor be used with both ReactJS as well as React Native (which has bridge support for creating native IOS and Android apps)
I haven't used React Native extensively enough to know for sure, but based on #116 I think it can be. Give it a shot and let me know if you run into trouble!
Yes, we use fluxxor via childContextTypes
var Home = require('home');
var flux = new Fluxxor.Flux(stores, actions.methods);
var iPhoneApp = React.createClass({
childContextTypes: {
flux: React.PropTypes.object,
},
getChildContext() {
return {
flux: flux,
};
},
render: function() {
return <Home />
}
});
AppRegistry.registerComponent('iPhoneApp', () => iPhoneApp);