EventsMapper
A Function you provide to Redux Beacon to map actions to eventDefinitions.

Syntax

1
import {
2
eventForActionA,
3
eventForActionB,
4
eventForActionB2,
5
} from './event-definitions';
6
7
const eventsMapper = (action) => {
8
switch(action.type) {
9
case 'ACTION_A':
10
return eventForActionA;
11
case 'ACTION_B':
12
return [eventForActionB, eventForActionB2];
13
default:
14
return [];
15
};
16
}
Copied!

Rules

Typescript Type

1
import { EventsMapper } from 'redux-beacon';
Copied!

Usage