mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Replace React.createClass with create-react-class
Summary: This replaces all uses of `React.createClass` with `createReactClass` from the `create-react-class` package, attempting to match use of `var` and `const` according to local style. Fixes #14620 Refs #14712 Closes https://github.com/facebook/react-native/pull/14729 Differential Revision: D5321810 Pulled By: hramos fbshipit-source-id: ae7b40640b2773fd89c3fb727ec87f688bebf585
This commit is contained in:
committed by
Facebook Github Bot
parent
20224b74a4
commit
9afb71fde8
@@ -22,6 +22,7 @@ const StyleSheetPropType = require('StyleSheetPropType');
|
||||
const TextStylePropTypes = require('TextStylePropTypes');
|
||||
const Touchable = require('Touchable');
|
||||
|
||||
const createReactClass = require('create-react-class');
|
||||
const createReactNativeComponentClass = require('createReactNativeComponentClass');
|
||||
const mergeFast = require('mergeFast');
|
||||
const processColor = require('processColor');
|
||||
@@ -96,7 +97,8 @@ const viewConfig = {
|
||||
*/
|
||||
|
||||
// $FlowFixMe(>=0.41.0)
|
||||
const Text = React.createClass({
|
||||
const Text = createReactClass({
|
||||
displayName: 'Text',
|
||||
propTypes: {
|
||||
/**
|
||||
* When `numberOfLines` is set, this prop defines how text will be truncated.
|
||||
|
||||
Reference in New Issue
Block a user