`prefix` option for `createActions`
See original GitHub issueAs I know there are a lot of folks writing something like this following ducks proposal:
const prefix = 'some-feature';
const { [prefix]: actionCreators } = createActions(
{
[prefix]: {
SOME_ACTION: payloadCreator,
},
},
`${prefix}/PLAIN_ACTION`,
);
This looks kinda hacky. Can we consider adding prefix
in options
for createActions
to handle this common case?
const actionCreators = createActions(
{
SOME_ACTION: payloadCreator,
},
'PLAIN_ACTION',
{
prefix: 'some-feature',
},
);
Will create pull request if this will be helpful.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:11 (7 by maintainers)
Top Results From Across the Web
createAction(s) - redux-actions
You can prefix each action type by passing a configuration object as the last argument of createActions . ... 'INCREMENT' in this example...
Read more >Grant permission to tag resources during creation
To enable users to tag resources on creation, they must have permissions to use the action that creates the resource, such as ec2:RunInstances...
Read more >Run Github action when pull request origin branch has certain ...
I am trying to create actions which behave differently depending on the prefix of the ... I've tried setting a script up like...
Read more >How to use the redux-actions.createAction function in ... - Snyk
createAction examples, based on popular ways it is used in public projects. ... type = createActionType(prefix, stage, separator) return createAction(type, ...
Read more >Create a custom process action - Power Apps | Microsoft Learn
After you create the action, you can't change the prefix. ... Unlike workflow processes, you don't need to set the following options:.
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
Is this documented anywhere other than this issue?
Merged and released.