Skip to content

Commit a84523b

Browse files
author
taylorhakes
committed
Fixed bugs with hot reloading app
1 parent daa2bec commit a84523b

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/containers/App.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ export default class App extends Component {
2424
componentDidMount() {
2525
window.addEventListener('keydown', this.handleKeyDown);
2626
}
27+
componentWillUnmount() {
28+
window.removeEventListener('keydown', this.handleKeyDown);
29+
}
2730

2831
handleKeyDown(e) {
2932
const { currentSlide, nextSlide, prevSlide } = this.props;

webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module.exports = {
1111
output: {
1212
path: path.join(__dirname, 'build'),
1313
filename: 'bundle.js',
14-
publicPath: '/bundle'
14+
publicPath: '/build'
1515
},
1616
plugins: [
1717
new webpack.HotModuleReplacementPlugin(),

0 commit comments

Comments
 (0)