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

Commit

Permalink
Merge pull request #273 from andykog/no-module-exports
Browse files Browse the repository at this point in the history
Drop using module.exports for devtools
  • Loading branch information
mweststrate authored Jun 10, 2017
2 parents 6fc69d1 + 628655a commit f1b3eef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ export const onError = fn => errorsReporter.on(fn);
export default exports;

/* DevTool support */
import { renderReporter, componentByNodeRegistery, trackComponents } from './observer';
if (typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__ === 'object') {
__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobxReact(exports, mobx)
const mobxReact = { renderReporter, componentByNodeRegistery, trackComponents };
__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobxReact(mobxReact, mobx)
}

0 comments on commit f1b3eef

Please sign in to comment.