Mahesh
IonicReactGamer

IonicReactGamer

How to Setup Ionic React with Gitpod

Photo by Alina Belogolova on Unsplash

How to Setup Ionic React with Gitpod

Mahesh 's photo
Mahesh
·Apr 7, 2022·

3 min read

Cloud development environments help developers to finish their work and side projects from anywhere with an active internet connection.

Many cloud development environments provide a generous free tier, for example - gitpod. The free tiers enable anyone to set up cloud dev environments for use cases such as learning to code or creating full-stack hobby projects.

This article shows you how to install ionic react using gitpod and create a project.

Ionic is a cross-platform open-source framework that helps web developers create web and mobile applications with a single code base using Javascript and popular web frameworks like React, Angular, and Vue.

  • First, create an empty repository in GitHub by clicking on the New button after signing in

8F29401E-A2C4-49E4-B304-E5C1A7DA99BC.jpeg

  • Now go to gitpod.io and sign up using your GitHub account

  • After signing in, you will see the gitpod dashboard page, which gives you quick access to Workspaces, Projects, and Account Settings

  • Click on Projects to create a new project

A5CA5FC5-CB71-433D-B07D-E39C6BB20B5D.jpeg

  • The new project page gives you the option of selecting the GitHub repository you have created

  • Once the repository is selected, the gitpod project creation is complete. The next step is to create a workspace by clicking on New Workspace

  • After creating the new workspace, you will be able to see the gitpod workspace with vscode.

6955396C-AA1B-451E-9C76-612664BEE312.jpeg

Installing Extensions

  • The gitpod workspace allows users to install vscode extensions

BD60C3F1-0BD6-444C-ABC4-3C4596CF7A41.jpeg

The only limitation is that it does not feature all the extensions provided by vscode on the desktop.

Install Ionic via Terminal

  • Gitpod workspace already comes pre-installed with node and npm. As a result, it becomes easier to install ionic using the following command -
$ npm install -g @ionic/CLI

Project Setup

  • Once Ionic is installed, the next step is to run the following command called ionic start via the terminal. This command uses a pre-made template to set up your project
ionic start
  • Choose React as the framework and hit the enter key

  • Enter the project name, let's call it superapp, and hit enter key to choose tabs as the starter template

1A664432-57A6-4B81-A323-4B65863D6563.jpeg

Ionic cli will now start building the template in the superapp folder.

  • Now change the directory to superapp, and enter the following command in the terminal
ionic serve

The ionic serve command helps in previewing the app in the browser.

Gitpod prompts you to open the browser tab to preview the app.

EE261CE3-21B7-4574-A74B-79C2DAC4AA5C.jpeg

You are now all set to build your app using the starter template ionic app.

It is always better to commit your changes back to the Github repository, and Gitpod makes that easy for you.

 
Share this