Convert from React.createClass to ES6 classes

Reviewed By: cpojer

Differential Revision: D3619143

fbshipit-source-id: e14e81468d467437ee3d79c34c34b7780a46ca1c
This commit is contained in:
Ben Alpert
2016-07-26 01:00:02 -07:00
committed by Facebook Github Bot 8
parent 857d2b8eae
commit a2fb703bbb
133 changed files with 2124 additions and 2191 deletions

View File

@@ -35,18 +35,12 @@ var {
var UIExplorerBlock = require('UIExplorerBlock');
var UIExplorerPage = require('UIExplorerPage');
var ToastExample = React.createClass({
class ToastExample extends React.Component {
static title = 'Toast Example';
static description = 'Example that demonstrates the use of an Android Toast to provide feedback.';
state = {};
statics: {
title: 'Toast Example',
description: 'Example that demonstrates the use of an Android Toast to provide feedback.',
},
getInitialState: function() {
return {};
},
render: function() {
render() {
return (
<UIExplorerPage title="ToastAndroid">
<UIExplorerBlock title="Simple toast">
@@ -101,8 +95,8 @@ var ToastExample = React.createClass({
</UIExplorerBlock>
</UIExplorerPage>
);
},
});
}
}
var styles = StyleSheet.create({
text: {