starting react native app
I'm starting work on React Native, using create-reactive-native-app and Exponent. There is a nice list of open source examples here, some of then are mentioned to use Exponent. https://github.com/ReactNativeNews/React-Native-Apps
I have few experience with nodejs. I already noticed there are several possible configurations for React Native apps. I usually use npm start to run it, but that don't work on those examples, since since they don't have a start script in package.json.
Take as an example the native-component-list app. How can I execute it after cloning and doing npm install?
Using node v6.11.4 and npm 3.10.10
I also tried using react-native run-android . It works when I create a new project with react-native init Ola2 But not with the downloaded code.
Here are some more details. I did this before: npm install -g react-native-cli
npm install
react-native run-android
Scanning folders for symlinks in xxx/native-component-list/node_modules (25ms)
Android project not found. Maybe run react-native android first?
react-native android
Scanning folders for symlinks in xxx/native-component-list/node_modules (26ms)
Unrecognized command 'android'
Run react-native --help to see list of all available commands
As per this link, you can run the app with command react-native run-android
(for android)
I found the problem. I just had never used Expo.io way to create a ReactNative app. I only knew the init and the crna ways. This apps where created with the exp tool. So,to run it, just do:
npm install exp --global
npm install
exp android
exp start
Comments
Post a Comment