Skip to content

Commit

Permalink
Merge pull request #7 from didierfranc/master
Browse files Browse the repository at this point in the history
Fix deprecated: useStrict without argument
  • Loading branch information
zalmoxisus authored Sep 8, 2016
2 parents 7117a07 + f8c9ea8 commit e494c71
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/counter/stores/appState.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { observable, action, extras, useStrict, runInAction } from 'mobx';
import remotedev from '../../../src/dev'; // import remotedev from 'mobx-remotedev/lib/dev';

useStrict();
useStrict(true);

const appState = observable({
count: 0
Expand Down
7 changes: 5 additions & 2 deletions src/spy.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ const monitors = {};
const scheduled = [];

function configure(name, config = {}) {
if (typeof config.onlyActions === 'undefined') onlyActions[name] = mobx.useStrict();
else onlyActions[name] = config.onlyActions;
if (typeof config.onlyActions === 'undefined') {
onlyActions[name] = mobx.isStrictModeEnabled && mobx.isStrictModeEnabled();
} else {
onlyActions[name] = config.onlyActions
}
if (config.filters) filters[name] = config.filters;
if (config.global) {
if (fallbackStoreName) throw Error('You\'ve already defined a global store');
Expand Down

0 comments on commit e494c71

Please sign in to comment.