Skip to content

Commit

Permalink
add a basic react component
Browse files Browse the repository at this point in the history
  • Loading branch information
adekbadek committed Dec 27, 2016
1 parent e46bf85 commit 7da5a70
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions source/app.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,20 @@
const who = 'World'
console.log(`Hello ${who}`)
import React from 'react'
import { render } from 'react-dom'

class App extends React.Component {
constructor () {
super()
this.state = {
who: "React"
}
}
render () {
return (
<div>
{`Hello ${this.state.who}`}
</div>
)
}
}

render(<App />, document.getElementById('root'))

0 comments on commit 7da5a70

Please sign in to comment.