Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Redux-Toolkit Docs for Integration #1323

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion docs/plugin-redux.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,19 @@ ReactotronConfig, you'll need to add `reactotron-redux` as plugin

+ export default reactotron
```
## Using Redux-toolkit
Then, add enhancer from `Reactotron.createEnhancer()` to `enhancers` in `configureStore`

```diff
import {configureStore} from '@reduxjs/toolkit';
+ import Reactotron from './ReactotronConfig'
const store = configureStore({
... (reducers, middlewares etc),
+ enhancers: __DEV__ ? [Reactotron.createEnhancer!()] : [],
});
```

## Using Classic Redux
Then, add enhancer from `Reactotron.createEnhancer()` to `createStore` as last parameter
jamonholmgren marked this conversation as resolved.
Show resolved Hide resolved

```diff
Expand All @@ -63,7 +75,7 @@ import { createStore } from 'redux'

Note: passing enhancer as last argument requires redux@>=3.1.0

## If you have middleware
### If you have middleware

```diff
import { createStore } from 'redux'
Expand Down