I am new in react native. when i create react native app by :create-react-native-app My project name the project will create with some thing named Expo in it directory.
then when i run it in emulator it will running by expo and i having to see an app named Expo and i have to run my app by using that. Ok?
i did many search a bout Expo and saw that site, and many other sites and notes which were about Expo but i understood nothing, just Expo will make it Easy to run your app.
now i want to ask: if i use expo; will my clients have to use that for running my app on their devices??
and ask: will i have to pay money for some essential things in future ?(Given that i never want to pay any thing )
will Expo make my application depending on himself(Expo) and prevent me to use various APIs like google map or ?
and in last: using that or not? which way is more professional?
Firstly, welcome to the React Native community!
Most of these questions can be answered in the Expo FAQ
if i use expo; will my clients have to use that for running my app on their devices??
You can at any time detach your app from expo and publish it to the App Store or Android Play Store.
will i have to pay money for some essential things in future ?(Given that i never want to pay any thing )
From the expo FAQ page: "Expo is free.
Our plan is to keep it this way indefinitely.
Expo is also open source, so you don’t have to trust us to stick to that plan.
We might eventually charge money for services built on top of Expo or for some kind of premium level of support and consulting."
will Expo make my application depending on himself(Expo) and prevent me to use various APIs like google map or ?
Assuming you are talking about Native Modules.
Expo provides a very large API for building a native app.
Some known reasons you might detach are:
Using a companies Proprietary internal native API
Unsupported libraries like React Native Fetch Blob - this is currently being added to React Native but until then it is not available in Expo
If you do need to add custom Native Modules, you could always detach from expo. When you Detach you will get an ios, and a android project.
Lastly you could always recommend new features: https://expo.canny.io/feature-requests
and in last: using that or not? which way is more professional?
Using Expo will provide you with tested Native Modules on top of React Native, if anything this makes it more professional.
Here are some popular apps constructed with React Native.
Related
First, I have a web app made with angular + angular material that looks like a mobile app, now I "ported" this webapp to a native mobile app using capacitor + cordova plugins and works fine, all the features work fine.
My deployment proces is:
Build angular app, sync to android, build android and then publish in play store (same for ios), it works, but, every time I make a change to my web app, I have to repeat this process and you know, the user has to download the new version of the app, install, and use, I would like to avoid this.
Since my app is web, located on a site (It can be accesses via web too) I would like to know if there is something that inside my webview opens the url of my site (without exiting the app, I tried making a redirection but it opens a web browser), so, the end user won't have to download the new version of the app every time I make a change and I won't have to upload the build to play store and app store.
I know that it can be done because my bank app does something like this but I don't know how to do it or how to search for it
How can I achieve this?
Thanks and sorry for my english, I hope I have explained what I want to do
"Live updates" are one way to solve this. Live updates allow you to send patches to your app and actually change the app code to some extent without going through app store review. Big updates will still have to go through app store review, but you can make lots of little updates "live" by using a live update service.
You can do live updates with Ionic. Ionic is open-source, but the live updates are part of the Ionic team's Appflow package, which is a paid service. Pricing currently starts at $499/month for 25,000 updates.
In this same space, there's Capgo, which is cheaper and works with Capacitor in general (does not require Ionic).
More info: Long discussion on this topic in the capacitor-community github repo
Ionic is the framework that would fit your use case. You can build apps in angular and ionic wraps it in a webview of native android apps. If you need to access native android feature, you can install capacitor lib too along with ionic. Capacitor is a library to interact with mobile's api (IOS and Android) with javascript.
Anoter approach to build native android apps with JS would be reactnative. It is different from ionic. You would have to be familiar with react sytax to get statrted easily. React native is not a webview app rather it is compiled to native platform code.
Look into flutter too. It uses dart but apps perform faster made with flutter and it can build both for android and IOS with same codebase
CONCLUSION
If you want to stay in angular code, go with IONIC
It's common to run into situations where we need a third party library that uses native code. Examples: PayPal integration, access to the wireless system, etc.
The official answer for this is "you have to eject". Alright, everybody knows that I know that - no need to reply with this, please.
But there are expo packages that use native code. For example, the react-native-appearance.
So it is possible to create expo libraries that use native ios/android code. But I wonder how? I found no documentation about it. It seems to me that only the Expo core team knows about it because I only see this being used on packages developed by the Expo core team. Maybe I am not looking it right, but I found none, zero information on how packages like react-native-appearance are made.
Question:
How to create an expo package that contains native ios/android code (like react-native-appearance)?
Expo packages a whole bunch of Native Modules with the SDK, including react-native-appearance. If the Native code is included in the SDK, then you can use it, otherwise you might have to eject. Case-in-point, a hello-word expo app is much larger in size that a bare React-native-init hello-world app.
While I'm trying to install Realm, I'm asked to edit some of the generated .java files for Android:
https://realm.io/docs/javascript/latest/#getting-help
However, Create React Native App hides the system level code from the user. Does that mean using CRNA is impossible, and I have to switch to straight React Native?
create-react-native-app has its own build scripts that depend on the platform specific code to be modified by Expo.
The whole idea of create-react-native-app is to stick to js. By sticking to js, you can take advantage of some pretty neat features such as running your app through the Expo Client or live developing on the web. They can do this because they can serve their static (I think it's pretty static) platform specific code everywhere.
This means you can't use any native code or even third party native code modules (such as react-native-camera) while using create-react-native-app.
From the docs:
Standard Expo projects don’t support custom native code, including
third-party libraries which require custom native components. In an
Expo project, you only write pure JS. Expo is designed this way on
purpose and we think it’s better this way.
If you would like to use native code and create-react-native-app, expo has a detach process that will reveal the platform specific code. You can check it out here.
Lets say I have a RESTful web api as a backend, and a seperate client side react app. Ideally I'd like that react app to run on android/ios mobile devices. What are my options?
The ones I am already aware of:
Create a "shell" app that is basically a WebView/UIWebView that loads the web app. You could go further and add some other functionality like navigation to make the app feel more native. This would be quick to implement but the downside is the app wouldn't feel as nice as a proper native app.
Use Apache Cordova or similar tool (hybrid app). The advantage over WebView is that it has a standard api/set of plugins to access that allow use of device features like camera or geolocation that work across different platforms.
Just create a completely native app. One option would be to use react-native as this would be a similar developer experience to react, but AFAIK this would still involve the creation of a separate app - existing react code could not be re-used (is this correct?). A great user experience could be provided here but the downside would mean slower development time because another app would need to be created.
Does anyone know if there are any options I've not considered here? Also, any comments on getting some kind of code re-use between react and react-native apps would be great.
I have been doing research about usability scenarios of React and React Native to ultimately decide whether it is a feasible and responsible decision to embed React (or React Native) to an existing mobile app.
So far, what I have learned is that it is possible to render React Native code within a custom view in both Android and iOS. Embedding React is simpler, since a React app is literally a web page that loads the client side framework.
My concerns are many and may also be pointless if I misinterpreted some scenarios. Below are the ones for which my Google skills failed me to get some answers.
Is it possible to use a third party's React component in a React Native rendering view?
What do I lose in terms of backward compatibility and UI performance to fully utilize React Native in mobile? Do low-end devices handle it well?
Is debugging React and React Native a pain? This question may and should be responded subjectively.
When I use React Native, is it possible to push updates to my app's that specific part without publishing an update to Google Play or Apple App Store?
Is React or React Native incompatible with CoffeeScript on the server side? If so, can I avoid that with a custom build flow to ultimately end up with only Javascript files which contain all the server code?
Sorry for the long entry.
Thank you
I worked for react native for several months,and here is my answer:
Is it possible to use a third party's React component in a React Native rendering view?
No,react component for Browser cannot use for mobile.but there are many mobile specific component.You can find here:React.parts
What do I lose in terms of backward compatibility and UI performance to fully utilize React Native in mobile? Do low-end devices handle it well?
You can test these apps on low-end devices to see whether react native can meet your need.
Is debugging React and React Native a pain? This question may and should be responded subjectively.
No,debug React Native code is really easy and efficient.
When I use React Native, is it possible to push updates to my app's that specific part without publishing an update to Google Play or Apple App Store?
Yes,you can do these things easily with Code Push.
Is React or React Native incompatible with CoffeeScript on the server side? If so, can I avoid that with a custom build flow to ultimately end up with only Javascript files which contain all the server code?
There isn't server side code in React Native,all your js code is in a single js file called bundle.js. the compile process is automatic with packager.sh witch provided from React Native,check this link.