Difference between React-native and Electron - react-native

I want to build a simple read-only app which should run on Android, iOS, Windows, OSX and Linux.
Does electron support mobile platform?
I couldn't figure out which one should I go for.

Electron include chrome engine to render web pages as Native apps with support for different plugins to add desktop apps features.
Electrino doesn't include any render engine it uses the Safari engine on the Mac so the installation file is smaller than Electron.
There's no support for Windows yet.
React Native is using a cross-platform render to Android and iOS.
Example: <Text> on Android will be TextView and on iOS will be UITextField
React Native Web made React Native work on web
Example: <Text> on web will be <p> or <label> not sure
and after that, it can work on the desktop by electron
You can build universal apps by using this template by React Native code.
Also if you want a specific target you can add component.web.js or .electron.js
or .android.js or .ios.js so it will render to this target only
https://github.com/react-everywhere/re-start/tree/react-16

Take a look at PWAs. These can be installed on almost all the major mobile and desktop platforms plus it is a web app.
https://developers.google.com/web/progressive-web-apps

Electron does not support mobile platforms, but it will be difficult to use one framework for mobile apps and computer apps.
I would recomment to use phonegap for mobile and electron for the computer application

Related

React Native CLI Setup for both IOS and android

I am trying to start a react native project using the React Native CLI method (https://reactnative.dev/docs/environment-setup). My first question is, if I have a mac and my friend has a windows computer can we both work on the same app? Also, how do I configure one single code base for both ios and android? Do I just follow the installation instructions for both in a single project? Thanks!
Yes, you can work separately on windows and mac for the same app and you don't have to configure any kind of codebase as react native is hybrid app development technology, you just have to write a single code for both the android and ios platforms.
To install react native CLI just follow the official document on your specific platforms because both of them have a slight difference in the installation process, after successful installation, I would suggest you to use some kind of VCS(Version controlling system) like git or svn.
I am also working in the same process as you have described I am developing in windows and my friend is working on the mac.
feel free to contact me I will help you if you have any kind of queries

Can I use the same codebase for both a React Native macOS app and a React Native Windows app?

I am trying to create an app using React Native that runs on iOS, Android, macOS and Windows. An advantage of being able to use React Native is that you can share code between platforms.
I am following the setup guides for React Native macOS and Windows, but in the guides, they guide you through creating a new app from scratch for each platform. As I want to use the same app, so I don't have to write the same code twice, I create the macOS app following the guide. Then, in this app, I use the command npx react-native-windows-init --overwrite from the Windows guide to initialise the Windows platform. But when I then go to run the macOS app using the command npx react-native run-macos, I get the error:
Cannot find module 'metro-config/src/defaults/exclusionList'
and
no bundle URL present
One thing I find strange about the setup guides is that for macOS it tells you to use React Native 0.63 and for Windows 0.66. I used 0.66 for both, maybe this is the problem. But if it is, and each platform requires different versions of React Native, how can I use the one app / codebase for both platforms? This goes against one of React Native's core premises:
Create platform-specific versions of components so a single codebase can share code across platforms.
Is it possible to create a single app for both desktop platforms like you would with iOS and Android, and if so, how?
Yes, you can. You will have to create a mono repo
Or you can use mono repo boilerplate. Here is a link to it
https://github.com/mmazzarolo/react-native-universal-monorepo

Is it possible to build a android and iOS app using React Native in Windows Laptop?

Is it possible guys? As I know I can use the React Native eusing Windows Laptop but I can't build or produce a mobile ios app using Windows laptop?
Also what are the conflicts when developing android app and iOS app using Reactive Native
You can develop your iOS and Android app completely on windows, but it is correct, that you need a Mac to build and deploy it for iOS app. You could use a service like https://www.macstadium.com/ for this step. They offer access to macs on a monthly basis.
I'm working with RN since 2015 and I only found a few "conflicts":
1.) You have to double check styling between iOS and Android, since a few properties behave little different (like overview). But the RN team is constantly working on this and it gets better and better.
2.) If you need access to native device functions like InApp purchase API, you have to find Libraries, which work on iOS and Android.
All in all RN is a very good framework for writing cross platform apps. You should give it a try :-)

IBM worklight Native to Hybrid Migration

If there is an already existing Android app and now it has to be turned into hybrid app supporting both Android and iOS, how should I do that?
Native Android apps are written in Java.
Hybrid apps are written in HTML, JS and CSS.
You will need to recreate your logic and UI from scratch.

I'm confused about the tools/frameworks for mobile web app development

I'm confused. What are the differences between Sencha, Titanium, and Cappuccino?
(I'm assuming you're talking about Appcelerator Titanium.)
Probably the biggest difference is the language used. Cappuccino uses a language called Objective-J, which is VERY similar to the Objective-C language used for native Mac and iPhone/iPad apps, but then gets compiled into Javascript for a web app. The other two use HTML/JS like a native web app.
Also, there's the big question of what the application actually looks like on a mobile platform, and what features it can access. Cappuccino and Sencha, AFAIK, allow you to design web apps that are optimized for mobile. But, since they're just glorified web pages, they won't be able to get things like accelerometer or GPS data; they aren't native iPhone or Android apps. Titanium, however, compiles to a native iPhone or Android app and allows you to do those things. Titanium can also compile to a native desktop application.
Hope this helps!
Sencha is the web-based javascript framework to develop webapp. You must use Sencha with other platform such as PhoneGap in order to run this webapp in iPhone / Android. There are many web-based javascript framework like Sencha such as jQuery Mobile, Magic Framework, xUI...
Titanium is different. It also use Javascript for develop app. But Titanium will compile these javascript to objective-C code. It mean when using Titanium, you develop native app, not webapp as PhoneGap.