summaryrefslogtreecommitdiff
path: root/index.js
diff options
context:
space:
mode:
authorYuval Adam <yuval@y3xz.com>2015-12-08 17:17:57 +0200
committerYuval Adam <yuval@y3xz.com>2015-12-08 17:17:57 +0200
commita4ed62da476682083b8a6c30ef768e9619e5b345 (patch)
tree6a2a2b792c506f59302309a856e051a61c8c7c7e /index.js
parentc52b19823b2575130b3ef1e133f494b176fa1500 (diff)
React+babel is working
Diffstat (limited to 'index.js')
-rw-r--r--index.js19
1 files changed, 17 insertions, 2 deletions
diff --git a/index.js b/index.js
index 993e9a9..f82e7c8 100644
--- a/index.js
+++ b/index.js
@@ -1,3 +1,18 @@
-require("./style.css");
+import './style.css'
-document.write("It works."); \ No newline at end of file
+import React from 'react'
+import ReactDOM from 'react-dom'
+
+class Note extends React.Component {
+ render() {
+ return <div>Hai!</div>
+ }
+}
+
+main();
+
+function main() {
+ const app = document.createElement('div')
+ document.body.appendChild(app)
+ ReactDOM.render(<Note />, app)
+} \ No newline at end of file