Redux Beacon
  • Introduction
  • Getting Started (Redux)
  • Getting Started (ngrx)
  • Examples & Recipes
  • Targets
    • GoogleAnalytics
    • GoogleAnalyticsGtag
    • GoogleTagManager
    • Segment
    • Amplitude
    • React Native: GoogleAnalytics
    • React Native: GoogleTagManager
    • React Native: Segment
  • API Reference
    • createMiddleware
    • createMetaReducer
    • EventDefinition
    • EventsMap
    • EventsMapper
  • Extensions
    • logger
    • OfflineWeb
    • OfflineReactNative
  • Utils
    • debounceEvent
    • ensure
    • combineEvents
  • FAQ
  • Migration Guide (v1 to v2)
  • Notes on Offline Events
Powered by GitBook
On this page
  • Syntax
  • Rules
  • Typescript Type
  • Usage
  1. API Reference

EventsMap

PreviousEventDefinitionNextEventsMapper

Last updated 7 years ago

An Object you provide to Redux Beacon to map action types to .

Syntax

import {
  eventForActionA,
  eventForActionB,
  eventForAllActions,
} from './event-definitions';

const eventsMap = {
  'ACTION_A': eventForActionA,
  'ACTION_B': eventForActionB,
  '*': eventForAllActions,
};

Rules

  • Each key in the eventsMap must correspond to an action type.

  • Each property in the eventsMap must be a valid

    .

  • The "*" key is special and can be used to match any action type.

Typescript Type

import { EventsMap } from 'redux-beacon';

Usage

eventDefinitions
eventDefinition
Getting Started
Examples & Recipes