Skip to content

Commit c3701ee

Browse files
committed
Create stateless component.
1 parent 94b4fe3 commit c3701ee

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/index.jsx

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
import React from 'react'
22
import ReactDom from 'react-dom'
33

4-
class RootComponent extends React.Component {
5-
render() {
6-
console.log('render root component')
7-
return <h1>Root Component Body</h1>
8-
}
4+
function RootComponent(props) {
5+
console.log('render root component')
6+
return <h1>Root Component Body</h1>
97
}
108

11-
129
ReactDom.render(<RootComponent />, document.getElementById("main"))

0 commit comments

Comments
 (0)