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:
Adam Perry
2017-05-16 23:43:46 -07:00
committed by Facebook Github Bot
parent af949877e6
commit ca2d57c744
14 changed files with 47 additions and 32 deletions

View File

@@ -74,7 +74,7 @@ const DataDetectorTypes = [
* import React, { Component } from 'react';
* import { AppRegistry, TextInput } from 'react-native';
*
* class UselessTextInput extends Component {
* export default class UselessTextInput extends Component {
* constructor(props) {
* super(props);
* this.state = { text: 'Useless Placeholder' };
@@ -91,7 +91,7 @@ const DataDetectorTypes = [
* }
* }
*
* // App registration and rendering
* // skip this line if using Create React Native App
* AppRegistry.registerComponent('AwesomeProject', () => UselessTextInput);
* ```
*
@@ -117,7 +117,7 @@ const DataDetectorTypes = [
* }
* }
*
* class UselessTextInputMultiline extends Component {
* export default class UselessTextInputMultiline extends Component {
* constructor(props) {
* super(props);
* this.state = {
@@ -145,7 +145,7 @@ const DataDetectorTypes = [
* }
* }
*
* // App registration and rendering
* // skip these lines if using Create React Native App
* AppRegistry.registerComponent(
* 'AwesomeProject',
* () => UselessTextInputMultiline

View File

@@ -41,7 +41,7 @@ const ImageViewManager = NativeModules.ImageViewManager;
* import React, { Component } from 'react';
* import { AppRegistry, View, Image } from 'react-native';
*
* class DisplayAnImage extends Component {
* export default class DisplayAnImage extends Component {
* render() {
* return (
* <View>
@@ -57,7 +57,7 @@ const ImageViewManager = NativeModules.ImageViewManager;
* }
* }
*
* // App registration and rendering
* // skip this line if using Create React Native App
* AppRegistry.registerComponent('DisplayAnImage', () => DisplayAnImage);
* ```
*
@@ -74,7 +74,7 @@ const ImageViewManager = NativeModules.ImageViewManager;
* }
* });
*
* class DisplayAnImageWithStyle extends Component {
* export default class DisplayAnImageWithStyle extends Component {
* render() {
* return (
* <View>
@@ -87,7 +87,7 @@ const ImageViewManager = NativeModules.ImageViewManager;
* }
* }
*
* // App registration and rendering
* // skip these lines if using Create React Native App
* AppRegistry.registerComponent(
* 'DisplayAnImageWithStyle',
* () => DisplayAnImageWithStyle
@@ -96,7 +96,7 @@ const ImageViewManager = NativeModules.ImageViewManager;
*
* ### GIF and WebP support on Android
*
* By default, GIF and WebP are not supported on Android.
* When building your own native code, GIF and WebP are not supported by default on Android.
*
* You will need to add some optional modules in `android/app/build.gradle`, depending on the needs of your app.
*

View File

@@ -57,7 +57,7 @@ const viewConfig = {
* import React, { Component } from 'react';
* import { AppRegistry, Text, StyleSheet } from 'react-native';
*
* class TextInANest extends Component {
* export default class TextInANest extends Component {
* constructor(props) {
* super(props);
* this.state = {
@@ -90,7 +90,7 @@ const viewConfig = {
* },
* });
*
* // App registration and rendering
* // skip this line if using Create React Native App
* AppRegistry.registerComponent('TextInANest', () => TextInANest);
* ```
*/