Cordova – Do the same code to use the same code for iOS and Android or two platform code to write separately?

Hi I have a good experience in working with Cordova using Ionic Framework and some other frameworks. Personally, I am not satisfied with the performance of Ionic, so I plan to switch from Ionic to React Native. < p>

I just want to know a few things before switching. When writing apps for Android on the Cordova project, the same code will be used for ios and windows. So it saves a lot of code writing. You Just add a platform with one line of command. But I’m not sure about React.

Does the same thing happen in React Native? Android and Ios use the same code on different platforms, or do we have to write all the code for another platform, or share part of the code?

In addition, the Ionic framework also comes with many components and pre-built UI. Does React Native also provide UI and components?

Should I learn React js first to start React Native or can I learn React Native and React Js together?

Can we use React Native code for the web platform?

So, let’s start with the React Native slogan “Learn once, write anywhere”.
This almost answers your first question. You have to write code for your Android app and your iOS app. This is because android and iOS have different native components.
You can reuse some code, Such as logic, how to distribute data (at most), etc., but you have to adjust it to use native components of android and iOS.
Edit: This was the previous practice, but it is now outdated because you only need to write it once now< p>

Second question. React Native allows you to take advantage of many known components. If the community is not in Facebook’s published content, the community can also enable other different components.
If due to For some reason, if you want something that no one creates a port for, you need to perform some native programming to enable such components.

The third question. Of course, it’s best to learn React first, but when writing React Native can easily learn React. React Native Playground is a good place to play React Native. Edit: RN Playground is no longer valid, but there are other places to play with RN, such as Expo.
Same, it depends You like the way to learn new frameworks and languages.

The fourth question. No, you cannot use React Native code as a web application. This is because your React Native application will use native components In iOS, you use and

the same (almost).
If you want to create a web application later, it doesn’t mean you won’t go home empty-handed. You can use the part Layout and rewrite them to work on the web. Like to convert views to divs, convert images to img, etc.

GL

Hello I have good experience in working with Cordova using Ionic Framework and some other frameworks. Personally, I am not satisfied with the performance of Ionic, so I plan to switch from Ionic to React Native.

I just want to Know a few things before switching. When writing apps for Android on the Cordova project, the same code will be used for ios and windows. So it saves a lot of code writing. You only need to add the platform with one line of command. But I don’t Determine Rea ct.

Does the same thing happen in React Native? Android and Ios use the same code on different platforms, or do we have to write all the code for another platform, or share part of the code?

In addition, the Ionic framework also comes with many components and pre-built UI. Does React Native also provide UI and components?

Should I learn React js first to start React Native or can I learn React Native and React Js together?

Can we use React Native code for the web platform?

So, let’s start with the React Native slogan “Learn once, write anywhere”.
This almost answers your first question. You have to write code for your Android app and your iOS app. This is because android and iOS have different native components.
You can reuse some code, such as logic, how to distribute data (at most), etc., but You have to adjust it to use the native components of android and iOS.
Edit: This is what was done before, but it is now outdated because you only need to write it once now.

The second one The problem. React Native allows you to take advantage of many known components. If the community is not in Facebook’s published content, the community can also enable other different components.
If for some reason you want someone to create a port for it You need to perform some native programming to enable such components.

The third question. Of course, it’s best to learn React first, but you can easily learn React when writing React Native. React Native Playground is A good place to play React Native. Edit: RN Playground is no longer valid, but there are other places to play with RN, such as Expo.
Similarly, it depends on how you like to learn new frameworks and languages.

Fourth question. No, you cannot use React Native code as a web application. This is because your React Native application will use native components. In iOS, you use with The

is the same (almost).
If you want to create a web application later, it doesn’t mean you won’t go home empty-handed. You can use partial layouts and rewrite them to work on the web. Like. Convert the view to div, convert the image to img, etc.

GL

Leave a Comment

Your email address will not be published.