Skip to content

Commit

Permalink
made it work with index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
flying-sheep committed Apr 7, 2017
1 parent d174313 commit 883338d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
7 changes: 4 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<!doctype html>
<ul>
<li><a href="http://flying-sheep.no-ip.org">blog</a>
</ul>
<script src=dist/bundle.js></script>
<link rel=stylesheet href=dist/style.css>

<main id=main></main>
2 changes: 2 additions & 0 deletions src/components/C/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.c {
width: 1rem;
height: 1rem;
background-color: blue;
}
4 changes: 3 additions & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ import * as ReactDOM from 'react-dom'

import C from './components/C'

ReactDOM.render(<C/>, document.querySelector('#main'))
document.addEventListener('DOMContentLoaded', e => {
ReactDOM.render(<C/>, document.querySelector('#main'))
})

0 comments on commit 883338d

Please sign in to comment.