Skip to content

Please use the latest react@16.0.0-alpha.12 specification for some react-native controls #14647

Description

@iwangx

Description

2017-06-21 10:14:43.029 [warn][tid:com.facebook.React.JavaScript] Warning: PropTypes has been moved to a separate package. Accessing React.PropTypes is no longer supported and will be removed completely in React 16. Use the prop-types package on npm instead. (https://fb.me/migrating-from-react-proptypes)
2017-06-21 10:14:43.048 [warn][tid:com.facebook.React.JavaScript] Warning: React.createClass is no longer supported. Use a plain JavaScript class instead. If you're not yet ready to migrate, create-react-class is available on npm as a drop-in replacement. (https://fb.me/migrating-from-react-create-class)
2017-06-21 10:14:43.051 [info][tid:main][RCTRootView.m:302] Running application HelloWorld ({
initialProps = {
};
rootTag = 1;
})
2017-06-21 10:14:43.052 [info][tid:com.facebook.React.JavaScript] Running application "HelloWorld" with appParams: {"rootTag":1,"initialProps":{}}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF

Reproduction Steps

react-native start

Sample Code

import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
export default class HelloWorld extends Component {
render() {
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 for dev menu
</Text>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
welcome: {
fontSize: 20,
textAlign: 'center',
margin: 10,
},
instructions: {
textAlign: 'center',
color: '#333333',
marginBottom: 5,
},
});
AppRegistry.registerComponent('HelloWorld', () => HelloWorld);

Solution

Please use the latest react to modify some of your internal controls, such as Text, so that these controls follow the latest react specification

Additional Information

  • React Native version: "react": "16.0.0-alpha.12", "react-native": "0.45.1"
  • Platform: both
  • Development Operating System: macOS
  • Build tools: Xcode

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions