React Native list of required items for ios/android - reactjs

Please be experienced with react native So I was wanting to get involved creating my app. I do want it to be on android and ios. So maybe two different list and everything I need to get setup for it. I already have node.js and react-create-my-app installed, I know I will probably need the android sdk and ios dev tools or something, but if someone has all the specific items I will need before starting and also any tips about say building the android version then just changing files and dependencies a, b and c to cross-platform the app. Anything like that would be greatly appreciated

Related

Make a cross platform application starting from a website

I made a website (not yet online), it uses HTML, CSS, Javascript, only. No React or Angular, and I have the following problem :
I'd like to make a cross-platform application based on it (for iOS, Android, Windows, Linux and MacOS).
What's the best way to do that ?
My searches :
I did few searches, not really satisfactory, because it seems I'll need to re-make my client-website entirely !
I found 2 ways : React Native and NativeScript, like described here.
Have you some other option ?
If you don't, is it really impossible to keep the code in React ? Like I can see there
I'm a bit confused, and I don't know what I should do to perform what I want.
Thank you for all answers you could give me !
For Desktop Development you can try Electron. It's a js library which helps you build cross platform applications by using Node, Chromium and js.
You can also go one step ahead and add react to it.
Applications like VSCode, Skype, Microsoft Teams, Spotify and I think even Slack are made using it.
For Mobile Development, you can go with React Native. In this way you'd make a cross platform mobile dev app too.
The pros are that using these tech stack you can build modern cross platform apps. For a web dev, this is the way to go.
The cons of Electron:
It's little heavy on memory, but nothing that would be a bottleneck.
The cons of React Native:
Is not suited for apps that require heavy computation and it's bundle size is significantly larger than the native apps
I want to add to this :There is an other option nw.js for desktop app it's like electron using chromium ,node and js.
and for the front-end you can use angular, react, vue it is really as you want .This is a link https://nwjs.io/ (It is cross-platform too ).
For mobile development I think I will recommend you : NativeScript (https://play.nativescript.org/?_ga=2.144049845.1620166462.1585302566-1314322155.1583139217) . It is a good option also cause you can easily add your website(html,css,javascript files ) in your NativeScript webview as your interface and I think this option won't take you time as making an other one with react-native (even if I know that react-native have his webview too).
So go and have a look to this ::How to load a local html file into a NativeScript webview .
Then all your work will be the database in sqlite but even for this you have :https://www.npmjs.com/package/nativescript-sqlite and other things to go quickly
:https://market.nativescript.org/

Does React Native Web Library support both PWA and Native APP?

Sorry for this idioit question. I’m a beginner developer of React. I know this library https://github.com/necolas/react-native-web can compile React Native runs as PWA, so does it mean that I just need to write the codes one time for both iOS and Android app and PWA?
Do I understand correctly?
The answer is a little bit more complicated but +/- yes. Mostly you write one code and its working everywhere, but there are platform needs that are different and you need to cover it sometimes differently.

Can i write the codes in JavaScript again If I have ejected (Detached) the app from expo.?

I have to use gif in my Android app for which I may require to detach my expo project.
I had a doubt that if I detach my expo project using expoKit, then can I write codes in JavaScript again as I used to before detaching my expo project? Detaching will create one folder for Android and one folder for iOS so then will I have to tackle them differently or writing JS code work? Please don't redirect me to the expo documentation. I have already read that but it still isn't clear to me!
Ejecting a React Native project only mean that you can now access the native parts of the projects separately as well. It doesn't mean that you cannot write JavaScript anymore.
Yes you will be able to write code in JavaScript same as before. The only difference will be that Eject process will expose build and other configurations that previously you cannot control. You will also be able to access/interface with Native modules.
Its always a good idea to take backup or commit everything in Version Control (e.g. GIT) so that you can go back (if required).
Only disadvantage of ejected app is you’ll have to worry about maintaining the native project because native areas will not auto upgrade. If anything goes wrong later during development, you’ll have to get familiar with the native code.
References:
https://docs.expo.io/versions/latest/expokit/eject
https://forums.expo.io/t/crna-eject-vs-expo-detach-pros-and-cons/11257

How to create multiple react native apps with same functionality

I am currently building a mobile app using react native. This is a parent app where parents can view marks, homework, fee details etc. We work with multiple schools and each school will need an app of their own. Only changes between these apps as of now is the splash screen and the app icon.
What can I do to keep my codebase more organized and less redundant between every app so that it will be easy to maintain, and also for new releases?
I have done a similar task before. I ported 4 different apps with unique styles from a single react native code base. You can read some related bits here.
Basically you just need to rename your app before building for ios and android.
If you need to apply different styles it is a much harder task just to explain here. However to give a hint, you need to make your app styles reusable like a theme. In my case I was using nativebase themeing. And before renaming the project I was changing the theme folder to be used for each app with a bash script. This gist might give you an idea.
For those looking for an answer,
The right way to build different apps out of the same codebase is to use android variants https://developer.android.com/studio/build/build-variants. This will allow you to sign your app with different keys for each variant. Each of these variants needs to have an appropriate folder inside the android directory, which is the place you configure splash screen, assets etc.
If you are using expo, this is not possible as you are not supposed to mess with native code. expo only supports release channels (dev, staging, prod) versions of your app.
Note: I didn't have to work with ios, so can't provide any useful links myself. But I am sure there will be something similar.

Next step after Ionic, NativeScript or ReactNative?

I created many Ionic apps, using all it's versions, from 1.x to the latest 3.x
All along with cordova, and AngularJS, it's a great framework, with big community, it's getting better and better over time.
But it's still an hybrid working over a WebView ..
With my knowledge to AngularJS, should i move easily to NativeScript, or start over with ReactNative ? from what i've seen ReactNative has better community, and many big apps are in it's showcase.
So, for cross-platform apps, should i keep working on Ionic, go with NativeScript, or move to ReactNative ?
Its good to know you are interesting in joining to the cause of creating native apps using JavaScript. You are in the right direction, both Nativescript and React Native will guide you to your goal: Build professional applications for iOS/Android using Javascript, however there are some differences you should know at the time you decide which framework to use.
React Native:
Its a framework developed by Facebook, using React it renders true native views. It uses Flexbox to decorate the apps so if you never used it that will be a new challenge for you, it is not hard to learn. My problem with this is that there is no direct support from the developer team, and only the community is from where you get the help, and sometimes it is not quite accurate. To create iOS apps you need a Mac computer, otherwise you can only create apps for Android. As far as I know, some basic information you might need in your app, such like platform, OS version, portrait/landscape it is developed by plugins from the community, and this information is not coming from the framework itself.
NativeScript:
Its created by Telerik, a very strong programming company who has high quality developers and strong support for its products. It uses Angular as a option to create your apps and its very well documented. If you are a good CSS developer you will be fine because they uses CSS to decorate your app. Nativescript community has developed tons of plugins. Nativescript core team is creating a lots of tools to help you through the process. Recently they launched a tool called Sidekick, which allows you to build/livesync your app from the cloud, which means you do not need a Mac computer for create iOS apps (isn't that cool?). With Nativescript you can choose Javascript, Typescript or Angular+Typescript, all of them will end up creating native apps. For support, you can contact the core team directly, and they will give you the best answer you can have, this is one of their goals.
I hope I have answered your question.
Thanks!
I don't know about React Native, but we have a great community with NativeScript. Hop on our Slack channel and meet the fam!

Resources