Permalink
Browse files

Moved the logic for <HelloWidget> into a new separate file 'webpack_i…

…n/hello_widget.jsx'.
  • Loading branch information...
maratbn committed Jul 27, 2018
1 parent 59750a0 commit 0919b00dc9e29212134b4e16de1af38c2683554e
Showing with 21 additions and 10 deletions.
  1. +1 −10 webpack_in/entry.jsx
  2. +20 −0 webpack_in/hello_widget.jsx
@@ -11,19 +11,10 @@ import React from 'react';
import ReactDOM from 'react-dom';
import ButtonWidget from './button_widget.jsx';
import HelloWidget from './hello_widget.jsx';
import Styles from './styles.es';
class HelloWidget extends React.Component {
render() {
return (
<div style={{ ...Styles.common, ...Styles.content }}>
Hello! I'm a React app!!
</div>
);
}
}
class TextWidget extends React.Component {
constructor(props) {
super(props);
@@ -0,0 +1,20 @@
// This file 'hello_widget.jsx' is part of an example for building a multi-widget React front-end
// app step by step as outlined in the tutorial blog at
// http://maratbn.com/blogs/2018/07/02/react-multi-widget/
import React from 'react';
import Styles from './styles.es';
class HelloWidget extends React.Component {
render() {
return (
<div style={{ ...Styles.common, ...Styles.content }}>
Hello! I'm a React app!!
</div>
);
}
}
export default HelloWidget;

0 comments on commit 0919b00

Please sign in to comment.