Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can one use Fluxxor with React Native? #143

Open
MartinOrtiz opened this issue Sep 25, 2015 · 2 comments
Open

Can one use Fluxxor with React Native? #143

MartinOrtiz opened this issue Sep 25, 2015 · 2 comments

Comments

@MartinOrtiz
Copy link

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)

@BinaryMuse
Copy link
Owner

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!

@rmdort
Copy link

rmdort commented Sep 30, 2015

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants