Create an Ionic 4 application with React

Paul Halliday
InstructorPaul Halliday
Share this video with your friends

Social Share Links

Send Tweet
Published 6 years ago
Updated 4 years ago

Creating cross-platform web-based applications with Ionic 4 and React is easy thanks to the Stencil compiler and create-react-app.

In this video, we look at how to use create-react-app and @ionic/react to make an Ionic 4 + React application

Instructor: [00:00] To create an Ionic 4 application with React, we can start off with a create-react-app application using typescript. Next up, we'll need to install ionic/react, ionic/core, and because Ionic 4 relies on the react-router, we'll also need that too, as well as the react-router-dom and the surrounding types.

[00:26] At this stage, we can now go ahead and import from ionic/react. To test the application works correctly, let's import the IonApp, the IonHeader, the IonToolbar, and the IonTitle components.

[00:43] The root of an Ionic app should be an IonApp component. Inside of that, we'll have an IonHeader, the header can have an IonToolbar, and the toolbar can have an IonTitle. We'll call it as Ionic and React.

[01:01] Finally, if we wanted to add content under the header, we need to import the IonContent. If we run our application with npm start, we can see our Ionic and React application on screen.

egghead
egghead
~ 3 minutes ago

Member comments are a way for members to communicate, interact, and ask questions about a lesson.

The instructor or someone from the community might respond to your question Here are a few basic guidelines to commenting on egghead.io

Be on-Topic

Comments are for discussing a lesson. If you're having a general issue with the website functionality, please contact us at support@egghead.io.

Avoid meta-discussion

  • This was great!
  • This was horrible!
  • I didn't like this because it didn't match my skill level.
  • +1 It will likely be deleted as spam.

Code Problems?

Should be accompanied by code! Codesandbox or Stackblitz provide a way to share code and discuss it in context

Details and Context

Vague question? Vague answer. Any details and context you can provide will lure more interesting answers!

Markdown supported.
Become a member to join the discussionEnroll Today