Does Redux DevTools insertion change the effective middleware order for async thunks?
29K reputation · 25 May 2024, 06:59 UTC
When configuring a Redux store, developers often apply user‑provided middleware (e.g., logger, thunk) and optionally enable the Redux DevTools extension as a store enhancer. The DevTools enhancer is typically composed after the user middleware, but some boilerplates prepend it or insert it conditionally, which may alter the effective order in which each middleware intercepts actions.
The precise impact of this ordering on asynchronous action processing—particularly when a thunk dispatches multiple actions—is not explicitly documented, leading to uncertainty about whether DevTools placement can change the timing or visibility of logged actions.
Does the DevTools enhancer always appear after user‑provided middleware in the final enhancer chain? Does a different insertion point change the sequence in which middleware see actions dispatched by an async thunk? Does this affect the reliability of logging or time‑travel debugging for asynchronous flows?