uidb-dev / react.cordova

best bundle to webApp mobile- react and cordova
67 stars 9 forks source link

Help me how to use this app. #31

Closed shinegoldmaster closed 3 years ago

shinegoldmaster commented 3 years ago

I run this first.

reco init com.example.first "first"

And it generates the node_modules, public, src, ....

It looks like react initial folders. for react js it is working. such as npm start, npm build, etc.

But when I am trying to add the android platform it says error.

cordova platform add android

The error was, Current working directory is not a Cordova-based project.

I am in the "hello" folder. I understood this system will work for cordova and react both.

But I cannot see any cordova folders and files.

So I tried, cordova create myApp org.apache.cordova.myApp myApp

Then I can see myApp folders and it works for corodva.

It looks like two systems are working respectively.

Then why this one is need? can you help me what I am wrong?

orchuban commented 3 years ago

I run this first.

reco init com.example.first "first"

And it generates the node_modules, public, src, ....

It looks like react initial folders. for react js it is working. such as npm start, npm build, etc.

But when I am trying to add the android platform it says error.

cordova platform add android

The error was, Current working directory is not a Cordova-based project.

I am in the "hello" folder. I understood this system will work for cordova and react both.

But I cannot see any cordova folders and files.

So I tried, cordova create myApp org.apache.cordova.myApp myApp

Then I can see myApp folders and it works for corodva.

It looks like two systems are working respectively.

Then why this one is need? can you help me what I am wrong?

Hi, which operating system is it? It's look like you didn't get full installation with reco init com.example.first "first". When you init project it's make a new react project, then new cordova project and then it's connect both of them. Maybe you got error on the way.

Some systems need sudo first: sudo reco init {app-id} {name}

When you init new project you have to get this:

project-folder
 |
 |--src
 |--public
 |--platforms
 |--plugins
 |--www
 |--build
 |--hooks
 |--package.json
 |--package-lock.json
 |-- ... 
shinegoldmaster commented 3 years ago

ok. I got it.

But I found the routing is not working. Can you tell me the reason> I am using the react-router-dom

Thanks.

orchuban commented 3 years ago

ok. I got it.

But I found the routing is not working. Can you tell me the reason> I am using the react-router-dom

Thanks.

We have another plugin that completes the routing: See it here Use with react-router

orchuban commented 3 years ago

@shinegoldmaster, Let me know if everything work good.

shinegoldmaster commented 3 years ago

Perfect. Thanks