diff --git a/js/components/heading.js b/js/components/heading.js
new file mode 100644
index 0000000..79df271
--- /dev/null
+++ b/js/components/heading.js
@@ -0,0 +1,9 @@
+import React from 'react';
+
+class Heading extends React.Component {
+ render() {
+ return
Hello, {this.props.title}!
;
+ }
+}
+
+export default Heading;
diff --git a/js/index.js b/js/index.js
index 64fb017..ce05bc4 100644
--- a/js/index.js
+++ b/js/index.js
@@ -1,7 +1,8 @@
import ReactDOM from 'react-dom';
import React from 'react';
+import Heading from './components/heading.js';
ReactDOM.render(
- Hello, world!
,
+ ,
document.querySelector('main')
);
diff --git a/js/mylib.js b/js/mylib.js
deleted file mode 100644
index 3f08203..0000000
--- a/js/mylib.js
+++ /dev/null
@@ -1,19 +0,0 @@
-const myFunc = function(){
- console.log('included!');
-}
-const myFunc2 = function(){
- var a = 1;
- var b = 2;
- var c = {a,b};
- console.log(c);
-}
-
-class Foo {
- bar(){
- console.log('ya');
- }
-}
-
-export default myFunc;
-
-export { myFunc2, Foo }