Skip to content

Commit

Permalink
Use mitt instead of EventEmitter for the client HMR (vercel#1399)
Browse files Browse the repository at this point in the history
error handling.
  • Loading branch information
arunoda authored Mar 13, 2017
1 parent 57099a5 commit e985e0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/index.js
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
import { createElement } from 'react'
import ReactDOM from 'react-dom'
import { EventEmitter } from 'events'
import mitt from 'mitt'
import HeadManager from './head-manager'
import { createRouter } from '../lib/router'
import App from '../lib/app'
Expand Down Expand Up @@ -42,7 42,7 @@ const headManager = new HeadManager()
const container = document.getElementById('__next')

export default (onError) => {
const emitter = new EventEmitter()
const emitter = mitt()

router.subscribe(({ Component, props, hash, err }) => {
render({ Component, props, err, hash, emitter }, onError)
Expand Down

0 comments on commit e985e0d

Please sign in to comment.