You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
iwangx
changed the title
请使用最新的react@16.0.0-alpha.12规范一些react-native控件 Please use the latest react@16.0.0-alpha.12 specification for some react-native controls
Please use the latest react@16.0.0-alpha.12 specification for some react-native controls
Jun 21, 2017
Yes, this does crash the party completely for me... react-native init creates a react-native folder that seems to be outdated.
For example: react-native/Libraries/StyleSheet/LayoutPropTypes_ still uses var ReactPropTypes = require('React').PropTypes;
It's worth noting that while #14712 explicitly tracks the prop-types issue reported here, it doesn't mention the React.createClass issue also reported here. Both of these issues need to be resolved before RN0.45.1 is actually usable.
facebook
locked as resolved and limited conversation to collaborators
Jun 23, 2018
Description
Reproduction Steps
Sample Code
Solution
Please use the latest react to modify some of your internal controls, such as
Text
, so that these controls follow the latest react specificationAdditional Information
The text was updated successfully, but these errors were encountered: