diff options
| author | Yuval Adam <yuval@y3xz.com> | 2015-12-08 17:17:57 +0200 |
|---|---|---|
| committer | Yuval Adam <yuval@y3xz.com> | 2015-12-08 17:17:57 +0200 |
| commit | a4ed62da476682083b8a6c30ef768e9619e5b345 (patch) | |
| tree | 6a2a2b792c506f59302309a856e051a61c8c7c7e /index.js | |
| parent | c52b19823b2575130b3ef1e133f494b176fa1500 (diff) | |
React+babel is working
Diffstat (limited to 'index.js')
| -rw-r--r-- | index.js | 19 |
1 files changed, 17 insertions, 2 deletions
@@ -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 |
