Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
iwangx opened this issue Jun 21, 2017 · 4 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@iwangx
Copy link

iwangx commented Jun 21, 2017

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
@iwangx 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
@Selman555
Copy link

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;

@JJMoon
Copy link

JJMoon commented Jun 23, 2017

Same Issue..
React Native version: "react": "16.0.0-alpha.12", "react-native": "0.45.1"

@hramos
Copy link
Contributor

hramos commented Jun 23, 2017

See #14712, it will be addressed soon.

@hramos hramos closed this as completed Jun 23, 2017
@Ashoat
Copy link
Contributor

Ashoat commented Jun 25, 2017

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 facebook locked as resolved and limited conversation to collaborators Jun 23, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

6 participants