fluxxor icon indicating copy to clipboard operation
fluxxor copied to clipboard

Can one use Fluxxor with React Native?

Open MartinOrtiz opened this issue 8 years ago • 2 comments

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)

MartinOrtiz avatar Sep 25 '15 21:09 MartinOrtiz

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!

BinaryMuse avatar Sep 25 '15 21:09 BinaryMuse

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);

rmdort avatar Sep 30 '15 07:09 rmdort