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

fix hot reloading #15

Merged
merged 1 commit into from
Feb 19, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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