What to pay attention to when react native version changes

1. React.createClass is abolished

For react version 16.0 and above, React.createClass of ES5 has been abolished. If you want to follow the previous ES5-like writing method, replace it with the createReactClass method in the create-react-class package or use ES6 syntax

Instructions:

var createReactClass=require("create-react-class");


var Demo = createReactClass({
   //ES5写法


})
  

2. Abandoned React.PropTypes.xxx, this is the reason if an error is reported when using a third-party library.

React.PropTypes.xxx is deprecated since react 15.5, please use prop-types library

How to use please see my open source Chinese react native class library (1) Article 13

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325406926&siteId=291194637