We have already build web application using meteor and that has not designed to support mobile app, but now we want to build for mobile(iOS and Android) too and design and functionality is quite different than web. I don’t need to affect web implementation and performance for mobile app also matters.
For example mobile app have tab based navigation feature and web has sidebar for navigation, so many more scenario i have that different than web.
Did it possible if i create another meteor project for mobile and connect to old meteor server if yes than is it best approach?
I need suggestion for best approach to achieve this one.
If performance matters and you’re not adverse to a second codebase then React Native is probably the way to go. Have a look at my for of react-native-meteor if you choose this path. @socialize/react-native-meteor
Hi @huppmeteor,
What did you use for our web app : boostrap, material or other UI ? did you already use react ?
User experience must be fluid on mobile, so you can’t expect to have the same layout for mobile and sometimes the same view (just take a calendar view for example).
As @copleykj said, react-native-meteor is really easy to learn and deploy (especially if you already know react) with react-native and Expo.
I wonder if it is really a good choice using Expo. You have to code (or upload your existing code) on their servers, don’t you? Can you please tell us what you like and dislike about Expo?
@lc3t35 Yes i am familiar with react and react-native, but what features i will lost if i go ahead with react-native-meteor in react-native ? publication and subscribe (react side) will work?
@lc3t35 I have one more question that in react-native-meteor we have to handle user session manually ? because when i logged in with Meteor.loginWithPassword then i can get user data in Meter.user() but after closing app and relaunch it’s value became null.
@gkaradag Expo allowed me to develop and test with dozens of users at light speed. I don’t know anything faster than that (if someone knows a better solution, ping me ).
A major point of attention is to update on time Expo sdk depending on your need for enhancements and resulting possible instability. Usually I keep one version ahead: for example, I’m still using sdk26 instead of sdk27 until sdk27 be stable enough to update.
import Meteor, { createContainer } from 'react-native-meteor';
...
class AppContainer extends React.Component {
componentWillMount() {
const url = 'ws://192.168.1.101:3000/websocket';
Meteor.connect(url);
}
render() {
const { status, user } = this.props;
.... // here you can play with user and status
}
}
export default createContainer(
() => ({
status: Meteor.status(),
user: Meteor.user(),
}),
AppContainer,
);
design your pages as React components, send them props with needed data, you can also use context, or high order component, otherwise if your app is more complex, use redux.