Skip to content

Commit

Permalink
updated readme and add image
Browse files Browse the repository at this point in the history
  • Loading branch information
yogiben committed Mar 10, 2016
1 parent 468fc2c commit a95adc2
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions README.md
@@ -1,54 +1,32 @@
# Awesome React Native Meteor
An "awesome" type curated list of how to use React Native and Meteor together.
An "awesome" type curated list of how to use React Native and Meteor together. Based on [Awesome React Native](https://github.com/jondot/awesome-react-native) which was based on [this](https://github.com/avelino/awesome-go), which was based on [this](https://github.com/vinta/awesome-python)...

### React Native & Meteor - why, how, what?
#### How do they work together?
**React Native** - is responsible for the native apps
**Meteor** is the server, providing the methods, account system etc.

#### Why do they work well together?
* **JS everywhere** - React Native apps are written in JS. So are Meteor apps. This means more code reuse.
* **Both use NPM** - from Meteor 1.3, there's full [NPM support](https://medium.com/@borellvi/meteor-meets-npm-a5cc48d90abe#.fodwjxha3).
* **Easy backend set up** - Meteor has an awesome built-in accounts system and much more. You can set up a decent backend in a few lines of code.

Additionally, there are many benefits of using Meteor as a backend such as free dev hosting etc.
Each has its own set of benefits.

#### How do they communicate?
Meteor sends data via its proprietary [DDP](https://www.meteor.com/ddp) protocol.

This is used to `call` methods on the server and `subscribe` to data.

#### Why not use Meteor + Ionic + Cordova?
It's been possible to build PhoneGap / Cordova apps for a while. You use the frontend library [Ionic](http://ionicframework.com/) with Meteor's [Blaze](https://www.meteor.com/blaze) which have been tied together nicely by [Meteoric](http://meteoric.github.io/).

If you're trying to decide between React Native and Cordova, make sure to read up on the grand old [hybrid vs. native debate](https://www.google.de/search?q=hybrid+vs+native&oq=hybrid+vs+native&aqs=chrome..69i57l2j69i60j69i61j69i60j69i61.2722j0j1&sourceid=chrome&es_sm=119&ie=UTF-8).

**Advantages**
* More frontend code reuse (especially if your app is written with Blaze)
* Gentler learning curve / more familiar technologies

**Disadvantages**
* Some worrying bugs, like very long time top open app
* Many believe [Blaze](https://www.discovermeteor.com/blog/blaze-react-meteor/) is on the way out
* Ionic was designed to work with Angular. Meteoric is a hack (albeit a very good one).

Our 10 cents:
* If the user experience has to be really slick, use React Native. If not (e.g. B2B apps) Meteoric is probably ok.
* Prototyping quickly -> Meteoric + Cordova. Building for the long haul -> React Native

### Gotchas
* React Native is a way less smoothe developer experience than Meteor. Be prepared for lots of red angry error screens
* Do not use arrow functions `() => ` to define `Meteor.publish` functions or `Meteor.methods({})`, otherwise `this` will not behave as expected

## Tutorials / Writeups
* [Meteor + React Native. Learning from Experience.](http://blog.differential.com/meteor-react-native-learning-from-experience/) - Writeup overcoming various challenges of porting
* [Meteor + React Native. Learning from Experience.](http://blog.differential.com/meteor-react-native-learning-from-experience/) - Writeup overcoming various challenges of porting

## Example apps
* [Todos](https://github.com/spencercarli/meteor-todos-react-native) - Meteor todos wired up to React Native app
* [Friends](https://github.com/JustMeteor/friends) - Simple app displaying list in collection. [Writeup here](http://justmeteor.com/blog/friends-connecting-meteor-and-react-native-by-example/)
* [Scientists](https://github.com/hharnisc/react-native-meteor-websocket-polyfill) - Simple app demonstrating DDP functionality

## Packages
###[react-native-meteor](https://github.com/inProgress-team/react-native-meteor)
### [react-native-meteor](https://github.com/inProgress-team/react-native-meteor)
A 'magic included' easy DDP connection exposing `subscribe`, `call`, `loginWithPassword` as well as `getMeteorData()` to use inside React components.

```
Expand Down Expand Up @@ -90,7 +68,7 @@ export default class App extends Component {
```


###[node-ddp-client](https://github.com/hharnisc/node-ddp-client/tree/minimongo-cache)
### [node-ddp-client](https://github.com/hharnisc/node-ddp-client/tree/minimongo-cache)
A more bare-bones package. It exposes `call` and `subscribe`. (Make sure to use the `minimongo-cache` branch).

Implemented [https://github.com/hharnisc/react-native-meteor-websocket-polyfill](https://github.com/hharnisc/react-native-meteor-websocket-polyfill) and [here](https://github.com/spencercarli/meteor-todos-react-native).
Expand Down Expand Up @@ -123,3 +101,25 @@ componentWillMount() {

## Videos
* [Harrison Harnisch - React Native and Meteor - Devshop SF](https://www.youtube.com/watch?v=7BF5LHn2B5s)

#### Why not use Meteor + Ionic + Cordova?
It's been possible to build PhoneGap / Cordova apps for a while. You use the frontend library [Ionic](http://ionicframework.com/) with Meteor's [Blaze](https://www.meteor.com/blaze) which have been tied together nicely by [Meteoric](http://meteoric.github.io/).

If you're trying to decide between React Native and Cordova, make sure to read up on the grand old [hybrid vs. native debate](https://www.google.de/search?q=hybrid+vs+native&oq=hybrid+vs+native&aqs=chrome..69i57l2j69i60j69i61j69i60j69i61.2722j0j1&sourceid=chrome&es_sm=119&ie=UTF-8).

**Advantages**
* More frontend code reuse (especially if your app is written with Blaze)
* Gentler learning curve / more familiar technologies

**Disadvantages**
* Some worrying bugs, like very long time top open app
* Many believe [Blaze](https://www.discovermeteor.com/blog/blaze-react-meteor/) is on the way out
* Ionic was designed to work with Angular. Meteoric is a hack (albeit a very good one).

Our 10 cents:
* If the user experience has to be really slick, use React Native. If not (e.g. B2B apps) Meteoric is probably ok.
* Prototyping quickly -> Meteoric + Cordova. Building for the long haul -> React Native

### Gotchas
* React Native is a way less smoothe developer experience than Meteor. Be prepared for lots of red angry error screens
* Do not use arrow functions `() => ` to define `Meteor.publish` functions or `Meteor.methods({})`, otherwise `this` will not behave as expected
Binary file added awesome-react-native-meteor.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a95adc2

Please sign in to comment.