Skip to content

dhwaj1902/react_capacitor

Repository files navigation

Convert ReactJs website into an Android/IOS App using Capacitor.js

  • Firstly create an react app using: npx create-react-app appname
  • Then install capacitor.js by writing: npm install @capacitor/cli @capacitor/core
  • After installing capacitor.js use the following command: npx cap init
    • This will ask Appname and Appid
  • After initilizing capacitor.js a file named capacitor.config.json will be added into your root folder looks something like this:
    • image\
    • you need to change webDir from 'www' to 'build' as shown\
    • image
  • Then run npm run build to make build of your app.
  • Then write npx cap add android to make you app for android or write npx cap add ios to make yor app for ios.
  • Then write npx cap open android to open it on android studio. Make sure that Android Studio is installed on your system.
  • Make apk using Android Studio and your react app is ready to use😊.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published