Skip to content

Commit

Permalink
feat(react.perf): implement whyDidYouUpdate tool
Browse files Browse the repository at this point in the history
  • Loading branch information
kiki-le-singe committed Sep 11, 2016
1 parent 06b75c6 commit 57a87e1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ Lint all files in `~/src` and `~/__tests__`.
* [Chai](http://chaijs.com/)
* [Sinon.JS](http://sinonjs.org/)
* [Enzyme](https://github.com/airbnb/enzyme)
* [why-did-you-update](https://github.com/garbles/why-did-you-update)


## Styles
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"serve-static": "^1.11.1",
"webpack": "^1.13.2",
"webpack-isomorphic-tools": "^2.5.8",
"why-did-you-update": "0.0.8",
"yargs": "^5.0.0"
},
"devDependencies": {
Expand Down
6 changes: 6 additions & 0 deletions src/client/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,10 @@ const store = configureStore(initialState)
const history = syncHistoryWithStore(browserHistory, store)
const root = (<Root history={history} store={store} />)

if (!__PROD__) {
const { whyDidYouUpdate } = require('why-did-you-update')

whyDidYouUpdate(React)
}

ReactDOM.render(root, document.getElementById('root'))

0 comments on commit 57a87e1

Please sign in to comment.