Replies: 1 comment 5 replies
-
Yeah, that particular docs example dates back to the start of RTK, and is now outdated. Originally, the Internally, But, later we found that didn't work great with TypeScript. So, we modified the The only time you'd even consider passing an array by itself is if you want to completely replace the default middleware, which is generally not how it should be used. The right answer overall is:
|
Beta Was this translation helpful? Give feedback.
-
https://redux-toolkit.js.org/api/serializabilityMiddleware
In the above doc, the middleware is added like this:
However, many other examples add middlewares like this
https://redux-toolkit.js.org/api/configureStore
middleware: [serializableMiddleware, logger]
but is this correct?Beta Was this translation helpful? Give feedback.
All reactions