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 all 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
13 changes: 11 additions & 2 deletions docs/plugin-redux.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,17 @@ ReactotronConfig, you'll need to add `reactotron-redux` as plugin

+ export default reactotron
```
## Using Redux Toolkit (RTK)

Then, add enhancer from `Reactotron.createEnhancer()` to `createStore` as last parameter
If you're using RTK, add the 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!()] : [],
});

```diff
import { createStore } from 'redux'
Expand All @@ -63,7 +72,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