You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
v3.0.0 had an unintentional breaking change of changing the location of the secondary entrypoints. These secondary exports are now exported from the main entrypoint (https://github.com/reduxjs/redux-devtools/pull/1075) and should be imported like so:
6
+
7
+
```diff
8
+
- import { composeWithDevTools, devToolsEnhancer } from 'redux-devtools-extension/developmentOnly';
9
+
- import { composeWithDevTools, devToolsEnhancer } from 'redux-devtools-extension/logOnly';
10
+
- import { composeWithDevTools, devToolsEnhancer } from 'redux-devtools-extension/logOnlyInProduction';
// Specify name here, actionsDenylist, actionsCreators and other options if needed
@@ -154,13 +154,13 @@ const store = createStore(
154
154
);
155
155
```
156
156
157
-
> There’re just [few lines of code](https://github.com/zalmoxisus/redux-devtools-extension/blob/master/npm-package/index.js) added to your bundle.
157
+
> There are just a[few lines of code](https://github.com/zalmoxisus/redux-devtools-extension/blob/master/npm-package/index.js) added to your bundle.
158
158
159
159
In case you don't include other enhancers and middlewares, just use `devToolsEnhancer`:
It's useful to include the extension in production as well. Usually you [can use it for development](https://medium.com/@zalmoxis/using-redux-devtools-in-production-4c5b56c5600f).
175
175
176
-
If you want to restrict it there, use `redux-devtools-extension/logOnlyInProduction`:
176
+
If you want to restrict it there, use `composeWithDevToolsLogOnlyInProduction` or `devToolsEnhancerLogOnlyInProduction`:
> You'll have to add `'process.env.NODE_ENV': JSON.stringify('production')` in your Webpack config for the production bundle ([to envify](https://github.com/gaearon/redux-devtools/blob/master/docs/Walkthrough.md#exclude-devtools-from-production-builds)). If you use `create-react-app`, [it already does it for you.](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/config/webpack.config.prod.js#L253-L257)
208
208
209
-
If you're already checking `process.env.NODE_ENV` when creating the store, include `redux-devtools-extension/logOnly` for production environment.
209
+
If you're already checking `process.env.NODE_ENV` when creating the store, import `composeWithDevToolsLogOnly` or `devToolsEnhancerLogOnly` for production environment.
210
210
211
-
If you don’t want to allow the extension in production, just use `redux-devtools-extension/developmentOnly`.
211
+
If you don’t want to allow the extension in production, just use `composeWithDevToolsDevelopmentOnly` or `devToolsEnhancerDevelopmentOnly`.
212
212
213
213
> See [the article](https://medium.com/@zalmoxis/using-redux-devtools-in-production-4c5b56c5600f) for more details.
See [redux enhancer's example](https://github.com/zalmoxisus/redux-devtools-extension/blob/master/npm-package/logOnly.js), [react example](https://github.com/zalmoxisus/redux-devtools-extension/blob/master/examples/react-counter-messaging/components/Counter.js) and [blog post](https://medium.com/@zalmoxis/redux-devtools-without-redux-or-how-to-have-a-predictable-state-with-any-architecture-61c5f5a7716f) for more details.
45
+
See [redux enhancer's example](https://github.com/reduxjs/redux-devtools/blob/main/packages/redux-devtools-extension/src/logOnly.ts), [react example](https://github.com/zalmoxisus/redux-devtools-extension/blob/master/examples/react-counter-messaging/components/Counter.js) and [blog post](https://medium.com/@zalmoxis/redux-devtools-without-redux-or-how-to-have-a-predictable-state-with-any-architecture-61c5f5a7716f) for more details.
Copy file name to clipboardExpand all lines: extension/docs/Recipes.md
+6-6
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
### Using in a typescript project
4
4
5
-
The recommended way is to use [`redux-devtools-extension` npm package](/README.md#13-use-redux-devtools-extension-package-from-npm), which contains all typescript definitions. Or you can just use `window as any`:
5
+
The recommended way is to use [`@redux-devtools/extension` npm package](/README.md#13-use-redux-devtools-extension-package-from-npm), which contains all typescript definitions. Or you can just use `window as any`:
6
6
7
7
```js
8
8
conststore=createStore(
@@ -15,7 +15,7 @@ const store = createStore(
15
15
16
16
Note that you many need to set `no-any` to false in your `tslint.json` file.
17
17
18
-
Alternatively you can use typeguard in order to avoid
18
+
Alternatively you can use type-guard in order to avoid
19
19
casting to any.
20
20
21
21
```typescript
@@ -54,21 +54,21 @@ The extension is not sharing `store` object, so you should take care of that.
54
54
55
55
### Applying multiple times with different sets of options
56
56
57
-
We're [not allowing that from instrumentation part](https://github.com/zalmoxisus/redux-devtools-instrument/blob/master/src/instrument.js#L676), because that would re-dispatch every app action in case we'd have many liftedStores, but there's [a helper for logging only](https://github.com/zalmoxisus/redux-devtools-extension/blob/master/npm-package/logOnly.js), which can be used it like so:
57
+
We're [not allowing that from instrumentation part](https://github.com/reduxjs/redux-devtools/blob/main/packages/redux-devtools-extension/src/logOnly.ts), which can be used it like so:
Copy file name to clipboardExpand all lines: packages/redux-devtools-extension/CHANGELOG.md
+16
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,22 @@
9
9
## 3.0.0
10
10
11
11
-**BREAKING** Rename `redux-devtools-extension` package to `@redux-devtools/extension` (https://github.com/reduxjs/redux-devtools/pull/948).
12
+
-**BREAKING** The secondary exports are now exported from the main entrypoint (https://github.com/reduxjs/redux-devtools/pull/1075) (NOTE: this will only work in `@redux-devtools/[email protected]` or later):
13
+
14
+
```diff
15
+
- import { composeWithDevTools, devToolsEnhancer } from 'redux-devtools-extension/developmentOnly';
16
+
- import { composeWithDevTools, devToolsEnhancer } from 'redux-devtools-extension/logOnly';
17
+
- import { composeWithDevTools, devToolsEnhancer } from 'redux-devtools-extension/logOnlyInProduction';
18
+
+ import {
19
+
+ composeWithDevToolsDevelopmentOnly,
20
+
+ devToolsEnhancerDevelopmentOnly,
21
+
+ composeWithDevToolsLogOnly,
22
+
+ devToolsEnhancerLogOnly,
23
+
+ composeWithDevToolsLogOnlyInProduction,
24
+
+ devToolsEnhancerLogOnlyInProduction,
25
+
+ } from '@redux-devtools/extension';
26
+
```
27
+
12
28
- Deprecate `actionsBlacklist` and `actionsWhitelist` in favor of `actionsDenylist` and `actionsAllowlist` (https://github.com/reduxjs/redux-devtools/pull/851).
Copy file name to clipboardExpand all lines: packages/redux-devtools-extension/README.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ const store = createStore(
43
43
);
44
44
```
45
45
46
-
There’re just [few lines of code](https://github.com/reduxjs/redux-devtools/blob/main/packages/redux-devtools-extension/src/index.ts). If you don’t want to allow the extension in production, just use ‘@redux-devtools/extension/lib/developmentOnly’ instead of ‘@redux-devtools/extension’.
46
+
There are just a [few lines of code](https://github.com/reduxjs/redux-devtools/blob/main/packages/redux-devtools-extension/src/index.ts). If you don’t want to allow the extension in production, just use `composeWithDevToolsDevelopmentOnly` instead of `composeWithDevTools`.
0 commit comments