mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-26 10:45:32 +08:00
Update examples in docs and address version lag of CRNA
Summary: cc hramos Pretty sure I've hit all of the places where AppRegistry is called in CRNA-pastable examples. Let me know whether you think we need to approach the version lag differently, I figure a caveat is as natural a place to call it out as any. If you end up finding anything else that needs tweaking before cherry picking, I'm happy to push that up here too. Closes https://github.com/facebook/react-native/pull/13744 Differential Revision: D5071038 Pulled By: hramos fbshipit-source-id: 4a4a6f2a73079aca627f17d75a4e4b395ecbd4a8
This commit is contained in:
committed by
Facebook Github Bot
parent
af949877e6
commit
ca2d57c744
@@ -18,7 +18,7 @@ as "🍕🍕🍕".
|
||||
import React, { Component } from 'react';
|
||||
import { AppRegistry, Text, TextInput, View } from 'react-native';
|
||||
|
||||
class PizzaTranslator extends Component {
|
||||
export default class PizzaTranslator extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {text: ''};
|
||||
@@ -40,6 +40,7 @@ class PizzaTranslator extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
// skip this line if using Create React Native App
|
||||
AppRegistry.registerComponent('PizzaTranslator', () => PizzaTranslator);
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user