Marks a class as redux action context. This context is used by the @ReduxAction decorator to resolve the action type.
@ReduxActionContext({
prefix: string;
})
Sets the prefix that shall be used for all redux actions that will use this context. The prefix and the action type is concatenated to one string.
type | string |
mandatory | yes |
@ReduxActionContext({
prefix: 'some-prefix/'
})
class SomeClass { // This will dispatch the following action:
//
@ReduxAction() // {
public someMethod(): string { // "type": "some-prefix/someMethod",
return 'some-return-value'; // "payload": "some-return-value"
} // }
}