feat(store-devtools): add actionCreators config option#5194
Open
Arul1998 wants to merge 1 commit into
Open
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
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.