Skip to content

Doesn't Work or Start on React-Native #151

@ghost

Description

I create a new latest React-Native project.
I didn't add or remove anything and then I add nodejs-mobile with this commands;

$ npm install nodejs-mobile-react-native --save
$ react-native link nodejs-mobile-react-native

I import import nodejs from 'nodejs-mobile-react-native';
And then I added this code

componentWillMount()
 {
   nodejs.start("main.js");
   nodejs.channel.addListener(
     "message",
     (msg) => {
       alert("From node: " + msg);
     },
     this
   );
 }

I changed this folders name; sample-main.js to main.js
sample-main.js to sample-package.json
But when my app works, there is no any alert.

I launch in Iphone 6S (Not pyschical device, Xcode's virtual Iphone 6s)
I use Mac (Mojave)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions