mirror of
https://github.com/zhigang1992/react-native-web.git
synced 2026-06-16 05:16:46 +08:00
[change] use 'prop-types' and 'create-react-class'
Preparation for React 15.5
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import createReactClass from 'create-react-class';
|
||||
import React from 'react';
|
||||
import { storiesOf, action } from '@kadira/storybook';
|
||||
import { Image, StyleSheet, Text, View } from 'react-native'
|
||||
@@ -25,7 +26,7 @@ import { Image, StyleSheet, Text, View } from 'react-native'
|
||||
* @flow
|
||||
*/
|
||||
|
||||
var Entity = React.createClass({
|
||||
var Entity = createReactClass({
|
||||
render: function() {
|
||||
return (
|
||||
<Text style={{fontWeight: '500', color: '#527fe4'}}>
|
||||
@@ -35,7 +36,7 @@ var Entity = React.createClass({
|
||||
}
|
||||
});
|
||||
|
||||
var AttributeToggler = React.createClass({
|
||||
var AttributeToggler = createReactClass({
|
||||
getInitialState: function() {
|
||||
return {fontWeight: 'bold', fontSize: 15};
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user