Ionic and Capacitor

From Sinfronteras
Jump to: navigation, search

https://ionicframework.com

https://ionicframework.com/getting-started/#cli

https://ionicframework.com/docs/cli/commands/cordova-build


When you create a new project with Ionec using the CLI (https://ionicframework.com/getting-started/#cli), the CLI will display 2 options in the terminal:

  • Use Angular
  • Use React
  • Vue (soon)

If you choose Angular, an Ionic-Angular project will be create. This will be a Cordova based project. Ionic used to use Cordova to build the native code. So you can build the native code by doing:

ionic cordova build <platform>

Recently, Ionic has launched Ionic React. If you choose React, a Ionic-React project will be create. This will NOT be a Cordova based project. Capacitor is the official cross-platform app runtime used to make your Ionic React web app run natively on iOS, Android, Electron, and the web. While there are no known technical limitations to using Ionic React with Cordova plugins, Capacitor is officially recommended. There are no plans to support a Cordova integration for Ionic React in the Ionic CLI tooling at this time. For more details, please see here.

So, as mentioned, there are no known technical limitations to using Ionic React with Cordova plugins, so you can still manually create a Ionic-Reac Cordova based project, so you can build the native file using Cordova instead of Capacitor. We will explain how to do that later.


Me parece que hay mucha documentación y exelentes ejemplos con Ionic, creo que mucho más que en Cordova:

  • There are many templates for starting a Ionic project, for example:
ionic start myApp sidemenu


  • Check out the Market for more designs:



Building an Ionic application using React

https://ionicframework.com/docs/react/overview


Some examples:




Navigation - Routing

Muy importante para entender Routing: https://ionicframework.com/docs/react/navigation



Ionic-Reac Cordova based project