spencercarli / react-native-meteor-boilerplate

MIT License
628 stars 139 forks source link

How to handle state? #8

Closed hakosl closed 8 years ago

hakosl commented 8 years ago

One of the biggest challenges when integrating react with Meteor seems to be how to handle state. With react in the browser we already have mini mongo, but with react native we don't have that luxury. Should we try to make mini mongo for react native? Or should we use redux?

faceyspacey commented 8 years ago

i mean it's no more challenging than using fetch to request data to populate Redux. Perhaps less challenging with subscriptions and observe callbacks and automatically authenticated requests users they login/signup.

What is really challenging--though perhaps a lot less than presumed--is integrating minimongo and tracker. It's definitely possible, and with Tracker React would be easy to integrate with React Native.

Anyone have a rough idea of what needs to be done to integrate minimongo?

spencercarli commented 8 years ago

In a client app I'm using redux - the implementation is a little hacky but it's working.

If you want something that's very similar to Meteor's API I would suggest checking out react-native-meteor I'm still doing my research on it and it's still in active development but it's looking very promising.

spencercarli commented 8 years ago

Closing because there are a few resources listed already.