[React Native] Up and Running

Source: Internet
Author: User

We ' ll download the requirements for getting started and React Native, refactor our app to ES6, walk through debugging, an D Talk about the philosophy behind React and React Native.

Install:

Install -- Install install-G REACT-NATIVE-CLI

Create a project:

React-native Init Githubnotepicker

Run the project:

CD githubnotepickerreact-native Run-ios

The simulator is pop up.

Enable the hot reload:

CMD + D-and  enable hot reload

After that, once the code, the app would reload automatically.

Debugger:

class Githubnotetaker extends Component {render () {name= "Zhentian"; Debugger; return (      <view style={styles.container}> <text style={styles.welcome}>Welcome to React Native! </Text> <text style={styles.instructions}>to get started, edit Index.ios.js</Text> <text style={styles.instructions}>Press CMD+r to reload,{' \ n '} CMD+d or Shake forDev Menu</Text> </View>    ); }}

We Add a ' debugger ' there. "CMD + D"---Enable remote JS debugging.

Then refresh the page and you'll see a page pops up and then open the Debug tool. Then you can debug as the Web.

[React Native] Up and Running

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.