Support for React Native bundle with Meteor

Hi,

I just started to looked at some React Native stuff. So while I’m looking at it, I found some interesting articles and tools which loads the app dynamically.

Blog post: Dynamically Update React Components

React Native Playground

So, it’s technically possible this could work just like Cordova support in Meteor. Except, you need build it for iOs. But I hope this can be simplified.

has anyone tried integrating React Native app into Meteor’s build process?

8 Likes

@hharnisc started a repo with a breaking build of the Meteor client bundle running in React Native.

The main issue was React Native not having polyfills for the browser which threw errors… I think that event listeners were some of the first ones to break.

I’m currently using RN with a REST API and the Node adapter for any real time needs. It would be nice to bundle it though!

3 Likes

Arunoda is interested in react native! Very curious to see what @arunoda builds now. :smile:

1 Like

Have you seen this repo https://github.com/angular/react-native-renderer ? Exciting times!

1 Like

React Native looks very promising. Unfortunately, it’s iOS only, so I’m sticking to Cordova for the time being. Although the Meteor-Cordova integration is quite quirky and I would love to have something more stable.

1 Like

React-Native Android should be released in a couple of months. However that doesn’t help you for today :smile:

1 Like

Nope, that won’t help me :smile:

Maybe this will draw me to React, eventually, although I’m still a bit reluctant. Not that I love Blaze that much (actually, it’s getting quite spaghetti after some time), but I like it’s clear separation of code and HTML.

That’s how I got started. ReactNative is easier than Native iOS if you’re a web dev. And the <View> and <Text> components don’t feel like HTML so it doesn’t feel dirty mixing JS and HTML. Egghead has a really nice video on it too.

1 Like

Yes, that sounds interesting. Yet I have to say that native iOS is quite easy since Apple introduced Swift. I learned it some weeks ago and I have to say that I indeed miss many of the Swift features in JavaScript. For me, it would be perfect if Swift was also a language that could be used for my Meteor application. Maybe this will be possible in the future, since Apple opened Swift as Open Source. And even more than that I would love to program Android apps using Swift, as I really dislike Java due to its complexity and over-sophistication.

[quote=“waldgeist, post:9, topic:8891, full:true”]I would love to program Android apps using Swift, as I really dislike Java due to its complexity and over-sophistication.
[/quote]

If you like Swift for iOS and hate Java for Android, you should consider using Groovy for Android. Groovy is one of the modern languages that Swift seems to be inspired by. These links should help you explore further on this:

I’ve not tried it personally but have been using Groovy for many years on the server side, rarely had to use Java since then. Groovy support for android is quite new though, so make sure you’ve done your mandatory checks.

Groovy sounds interesting. Yet, I have to admit that my capacities for using multiple languages in parallel are limited - this confuses me too much. If Groovy was a lingua franca for everything (Meteor, iOS, Android), I would be very happy.

React Native support would be awesome! This one is on my list. I’m not sure if anyone is working on this though.

1 Like

For full Meteor client support see the 12th comment on this post:
Meteor + Webpack: ES6 modules, hot-code-patching, fixes load order & more - #12 by SkinnyGeek1010

Basically we just need to polyfill some browser events and all should work like it does in the browser. Using webpack it’s fairly trivial to send all the meteor core + packaged to the app, then transfer the app code on file-change for development.

There’s already work started to allows ReactNative to request new app bundles on demand so that should be cooked in a little bit.

Since react-native is now out for android too(open-sourced ) this week. Was wondering if there is a way we can think of packaging react-native app with meteor. I see meteor apps are generally packaged as cordova only. So, i do not see a way, but i am way way behind in understanding meteor stuff off late.

4 Likes

hello

Any news on this topic ?

Best

jeangui

1 Like

Spencer Carli wrote a post in the Differential blog about his experience with React Native and Meteor. Definitely worth the read if you are interested in React Native.
Link: http://blog.differential.com/meteor-react-native-learning-from-experience/

2 Likes

Thanks for the link.
I gonna have a look.

I would love to see real support for react native as well!

Waking up an old thread. Any news on RN bundling? Now that RN has pretty complete support for Android too.

No integration yet. You can still use the low level DDP methods for realtime pub/sub.

Meteor-GraphQL and Lokka are also an option if you want to go that route. Currently no realtime support as the spec isn’t finished yet. I’m going to slowly integrate this into my own RN app to replace the AJAX calls.

2 Likes