ReactNative.createElement is deprecated. Use React.createElement from the "react" package instead.



  • 已经按照官方建议,像下面这样拆分了。但是还是报这个错。何解?

    import React, { Component } from 'react';
    import {
    Alert,
    View,
    ListView,
    TextInput,
    Text,
    Image,
    Dimensions,
    TouchableOpacity,
    ActivityIndicatorIOS,
    StyleSheet,
    } from 'react-native';



  • 或许你用的第三方组件里面用了这个方法呢?



  • 解决了,react-redux太旧,更新最新的4.4.5解决了。

    "dependencies": {
    "react-native": "^0.25.1",
    "normalizr": "^1.4.0",
    "react-redux": "^4.4.5",
    "redux": "^3.5.2",
    "redux-thunk": "^1.0.0"
    }


登录后回复