feat(store-devtools): add actionCreators config option - #5194
Merged
timdeschryver merged 5 commits intoJul 25, 2026
Conversation
Allow action creators to be passed to the Redux DevTools extension so actions can be dispatched manually from the extension's dispatcher. Closes ngrx#4038
timdeschryver
requested changes
Jul 17, 2026
timdeschryver
left a comment
Member
There was a problem hiding this comment.
Could you take another look at this please?
It doesn't seem to work, feel free to use the example-app as playground.
…gured action creators
The extension serializes action creators with JSON.stringify, so passing creator functions directly produced null entries in its dispatcher, and NgRx createAction creators are anonymous functions with no usable name. Dispatching also failed: the extension forwards dispatcher payloads ({ selected, args }) to connect() subscribers as-is, and unwrapAction only handled string payloads, so the payload was dispatched as an action without a type.
Normalize the configured creators into the { name, func, args } shape the extension renders (record keys or the creator's type become the display names), and resolve { selected, args } payloads back through the configured creators when the extension dispatches.
Contributor
Author
|
Thanks for catching this @timdeschryver you were right, it didn't work. Two problems:
Reworked in the latest commits:
Verified in the example-app: with actionCreators: FindBookPageActions, searchBooks shows up in the extension's dispatcher and dispatching it with { query: "tolkien" } triggers the search. Added specs covering the dispatch round trip (props, no-props, function-style creators with rest args, and unknown selected passthrough). Also merged main and fixed a mock.lastCall destructuring that failed the stricter type-checking (it was in the original commit too). |
rainerhahnekamp
approved these changes
Jul 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow action creators to be passed to the Redux DevTools extension so actions can be dispatched manually from the extension's dispatcher.
Closes #4038
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
There is no way to make action creators available in the Redux DevTools extension's dispatcher. Dispatching an action manually from the extension requires writing the action as a JSON string by hand each time, which is tedious and error-prone.
Closes #4038
What is the new behavior?
StoreDevtoolsConfigaccepts a new optionalactionCreatorsoption (an array or object of action creators, e.g. created withcreateAction). It is passed through to the Redux DevTools extension'sconnect/sendoptions, so the extension's dispatcher lists the app's actions and they can be dispatched manually from the DevTools UI.The option was requested in #4038 and corresponds to the extension's
actionCreatorsargument.Does this PR introduce a breaking change?
The option is optional and is omitted from the extension config when not provided, so existing setups are unaffected.
Other information
The feature was greenlit by @timdeschryver in the issue thread. Docs added to the store-devtools instrumentation options guide.