mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-14 16:39:47 +08:00
Standardize on using AwesomeProject for AppRegistry calls.
Summary: We've noticed that many newcomers paste sample code straight into a project created using `react-native init AwesomeProject`, but the sample code assumes the user is creating a new project for each example. This PR makes it so that these samples can be pasted into the same project from the Getting Started. Closes https://github.com/facebook/react-native/pull/14264 Differential Revision: D5149746 Pulled By: hramos fbshipit-source-id: cae95ab5b7baf64ddd9fe12d342ad05f785bb381
This commit is contained in:
committed by
Facebook Github Bot
parent
ffa76d02dc
commit
b1ecb84c97
@@ -30,7 +30,7 @@ export default class HelloWorldApp extends Component {
|
||||
}
|
||||
|
||||
// skip this line if using Create React Native App
|
||||
AppRegistry.registerComponent('HelloWorldApp', () => HelloWorldApp);
|
||||
AppRegistry.registerComponent('AwesomeProject', () => HelloWorldApp);
|
||||
```
|
||||
|
||||
If you are feeling curious, you can play around with sample code directly in the web simulators. You can also paste it into your `index.ios.js` or `index.android.js` file to create a real app on your local machine.
|
||||
|
||||
Reference in New Issue
Block a user