I know this might not be a correct forum to ask this question (but since it does involve meteor) so i think it wont be considered totally unrelated.
I have downloaded one of the apps showcased on Cordova’s website to test out how it feels on an actual mobile device. I am using LG G3 (which is an android device). I would say its not the best user experience for one simple reason: Its quite laggy. Even the list scrolling is laggy.
I was initially thinking of making a mobile app in meteor but after looking at Cordova’s laggy apps, i have to go some other route. So here is what i have come up with: I should make the mobile app in React Native, Web app in React and hook them both up with Meteor. Now me being a total noob in the field at this moment in time, i had the following questions:
- Is it possible to make React Native and React use an API layer which is powered by Meteor?
- Is it possible to make same components that are used in browser (React) and mobile (React Native) so that its easy to maintain them?
- Any major pitfalls that i should be aware of which might become road blocks after some major time investment
- Any other better implementation that i should look for instead?
P.S: All i want primarily is to have a good user experience which doesn’t lag where i can use HTML, CSS, JS technologies.
You can also use crosswalk webviews to get much better performance on Android.
Don’t use the stock browser.
I will let the community answer React-related questions as some of it is trailblazing (like using React Native with Meteor). There will be some (maybe a lot of) manual work to get that work.
I did check crosswalk - seems promising. I heard they are adding a package in 1.3 to allow crosswalk by
meteor add crosswalk
I am now just wondering if i should still stick with Cordova or should i just take the plunge and move towards React Native (which has a huge learning curve). My concern is mostly backed by the thought that i try to optimize cordova app as much as i can and even then it lags to which i will have to do all this effort again.
You can already add Crosswalk by doing
meteor add crosswalk in Meteor 1.2. So that should give you an idea of the performance improvements.
I think whether it makes sense to switch to React Native really depends on how comfortable you are with native development and whether you will be able to solve issues yourself. As you said, it has a huge learning curve, but in addition it is also in its early days, especially on Android. So don’t expect this to be a smooth ride, even though it may be worth it.
Ah - Thanks Martin
Yeah i believe i saw your keynote on youtube
Nice work heading the mobile apps for meteor.
I truly do not want to maintain two/three code bases for iOS, Android and Web browser but on the other hand i don’t want to give a laggy user experience either (i am sure you have been in this dilemma yourself some point in time). I originally just wanted to make a single app in meteor but like i said before - i was little disappointed at Cordova’s show cased apps and since meteor uses it for mobile app bundling i have to look elsewhere
I did see another keynote on youtube where a developer had hooked Meteor and React Native together (with just a bunch of lines). Now i am pretty sure there will be lots of challenges in that but if the end user gets a good app feel, i still think its worth the effort. Any thoughts?
Diving into React Native could definitely be worth it, but at this point, I think you’ll have to be prepared to put a lot of effort in getting to know the technology and in fixing issues yourself. It might be an idea to spend a few days on a prototype to see if it is a good fit.