Skip to content

Commit 42bd60d

Browse files
committed
Add a note about no-underscore-dangle
1 parent 218eb2c commit 42bd60d

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,16 @@
4646
```
4747

4848
Note: passing enhancer as last argument requires **redux@>=3.1.0**. For older versions apply it like [here](https://github.com/zalmoxisus/redux-devtools-extension/blob/v0.4.2/examples/todomvc/store/configureStore.js) or [here](https://github.com/zalmoxisus/redux-devtools-extension/blob/v0.4.2/examples/counter/store/configureStore.js#L7-L12).
49-
49+
50+
In case the linter doesn't allow using the underscore dangle, you need to wrap it like so:
51+
```js
52+
/* eslint-disable no-underscore-dangle */
53+
const store = createStore(reducer, preloadedState,
54+
window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
55+
);
56+
/* eslint-enable */
57+
```
58+
5059
Warning: Don't mix the old Redux API with the new one. Pass enhancers and applyMiddleware as last createStore argument.
5160

5261
#### 1.2 Advanced store setup

0 commit comments

Comments
 (0)