Skip to content
This repository has been archived by the owner on Apr 22, 2020. It is now read-only.

Commit

Permalink
Merge pull request #15 from kdoh/fix_hot_reload
Browse files Browse the repository at this point in the history
fix hot reloading
  • Loading branch information
kdoh committed Feb 19, 2016
2 parents aef0e12 + 7762271 commit 8697169
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"presets": ["es2015", "react"]
"presets": ["es2015", "react", "react-hmre"]
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"babel-loader": "^6.2.3",
"babel-preset-es2015": "^6.5.0",
"babel-preset-react": "^6.5.0",
"babel-preset-react-hmre": "^1.1.0",
"portfinder": "^0.4.0",
"webpack": "^1.12.13",
"webpack-dev-server": "^1.14.1"
Expand Down
8 changes: 5 additions & 3 deletions src/app.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React from 'react'
import Component from './component'
import React, { Component } from 'react'
import Widget from './widget'

const App = () => <Component />
class App extends Component {
render () { return <Widget /> }
}
export default App
8 changes: 0 additions & 8 deletions src/component.jsx

This file was deleted.

10 changes: 10 additions & 0 deletions src/widget.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React, { Component } from 'react'

class Widget extends Component {
render () {
const message = "I'm your widget. Have at it."
return <div>{message}</div>
}
}

export default Widget

0 comments on commit 8697169

Please sign in to comment.