Expose dispatch action type constants
See original GitHub issueFeature Request
Describe the suggestion or request in detail
In webchat customization scenarios, to set dispatch events or to intercept events using a middleware, the type has to be set to a string like WEB_CHAT/SET_TEXT
.
It would be great if you could expose the list of supported events as part of a constant so that we don’t have strings sprayed across the project and devs can check which events are supported.
Also, If the text associated with a particular event is changed here for some reason, devs wouldn’t have to update it in their projects too.
[Enhancement]
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Action Constants - React - LearnHowToProgram.com
In this lesson, we'll make another small refactor to use action constants. So far, all of our action types have been strings.
Read more >Strings vs constants for Redux action types - Stack Overflow
Same as PropTypes are redundant in typescript, the action constants are redundant. The reason for constants in redux actions is to avoid ...
Read more >Solution for simple action creation without string constants and ...
I was little annoyed by string constants as action types. And write solution for this, need for objective criticism and ideas.
Read more >Refactor to use Action Type Constants and Action Creators ...
This lesson covers the use of action type constants and action creators. Action type constants are common in legacy redux apps, ...
Read more >Redux FAQ: Code Structure
Rails-style: separate folders for “actions”, “constants”, “reducers” ... possibly with sub-folders per file type; “Ducks/Slices”: similar to ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It might also be nice to expose some of the action functions as well.
However, we probably don’t want to expose some of the action functions such as the connection and speech related actions.
Loading this up for discussion and prioritization for an upcoming release.