Skip to content

Commit 8e3ac6c

Browse files
committed
Extracted the logic for rendering 'Hello! I'm a React app!!' into a separate new widget <HelloWidget>.
1 parent 3d757d9 commit 8e3ac6c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

webpack_in/entry.jsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,10 @@ import React from 'react';
1010
import ReactDOM from 'react-dom';
1111

1212

13-
ReactDOM.render(<div>Hello! I'm a React app!!</div>, document.getElementById('react-app'));
13+
class HelloWidget extends React.Component {
14+
render() {
15+
return (<div>Hello! I'm a React app!!</div>);
16+
}
17+
}
18+
19+
ReactDOM.render(<HelloWidget />, document.getElementById('react-app'));

0 commit comments

Comments
 (0)