Skip to content

Commit

Permalink
Add shouldCatchErrors option for redux API of worker
Browse files Browse the repository at this point in the history
  • Loading branch information
jhen0409 committed Nov 12, 2016
1 parent d2a86a9 commit 058b309
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ Name | Description
`stateSanitizer` | *Function* which takes state object and index as arguments, and should return state object back. See the example bellow.
`maxAge` | *Number* of maximum allowed actions to be stored on the history tree, the oldest actions are removed once maxAge is reached. Default is `30`.
`actionCreators` | *Array* or *Object* of action creators to dispatch remotely. See the [example](https://github.com/zalmoxisus/remote-redux-devtools/commit/b54652930dfd4e057991df8471c343957fd7bff7).
`shouldCatchErrors` | *Boolean* - if specified as `true`, whenever there’s an exception in reducers, the monitors will show the error message, and next actions will not be dispatched.
`shouldHotReload` | *Boolean* - if set to `false`, will not recompute the states on hot reloading (or on replacing the reducers). Default to `true`.
`shouldRecordChanges` | *Boolean* - if specified as `false`, it will not record the changes till clicked on "Start recording" button on the monitor app. Default is `true`.
`shouldStartLocked` | *Boolean* - if specified as `true`, it will not allow any non-monitor actions to be dispatched till `lockChanges(false)` is dispatched. Default is `false`.
Expand Down
2 changes: 2 additions & 0 deletions app/worker/reduxAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ export default function devToolsEnhancer(options = {}) {
const {
name,
maxAge = 30,
shouldCatchErrors = !!global.shouldCatchErrors,
shouldHotReload,
shouldRecordChanges,
shouldStartLocked,
Expand All @@ -162,6 +163,7 @@ export default function devToolsEnhancer(options = {}) {
const store = configureStore(
next, monitorReducer, {
maxAge,
shouldCatchErrors,
shouldHotReload,
shouldRecordChanges,
shouldStartLocked,
Expand Down

0 comments on commit 058b309

Please sign in to comment.