Skip to content

Commit 1c4abfd

Browse files
committed
Use createClass instead of ES6 classes
Most of the React docs use createClass. It will be easier for students to follow the docs.
1 parent 7f8214b commit 1c4abfd

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/App.jsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
import React, { Component } from 'react';
1+
import React from 'react';
22

3-
export default class App extends Component {
4-
render() {
3+
const App = React.createClass({
4+
render: function() {
55
return (
66
<h1>Hello React :)</h1>
77
);
88
}
9-
}
9+
});
10+
export default App;

0 commit comments

Comments
 (0)