How to run React-Native Examples?

后端 未结 9 2171
暗喜
暗喜 2021-01-31 21:18

I can\'t find any instructions on how to install and run one of the other Examples provided in \'https://github.com/facebook/react-native/tree/master/Examples\' such as \'https:

9条回答
  •  广开言路
    2021-01-31 22:13

    You have to install node.js in your Terminal with

    brew install node
    

    ReactNative use Node.js to build the Javascript code inside the project.

    Then you need Watchman, a file watcher from Facebook with

    brew install watchman
    

    React Native use Watchman to rebuild your code when there's a change in it.

    The final thing is to install and run node with a Terminal window in the react-native folder.

    npm install
    npm start
    

    Now you can open a project from the react-native/Examples folder in Xcode, then build and run it.

提交回复
热议问题