AWS Amplify API
AWS Amplify Home
Options
All

- Public
- Public/Protected
- All

Inherited Externals Only exported
Menu

### Hierarchy

- HubClass

## Index

### Constructors

- constructor

### Properties

- name
- protectedChannels

### Methods

- dispatch
- listen
- remove

## Constructors

### constructor

- new HubClass(name: string): HubClass

- - Defined in core/src/Hub.ts:56

  #### Parameters

  - ##### name: string

  #### Returns HubClass

## Properties

### name

name: string

- Defined in core/src/Hub.ts:52

### protectedChannels

protectedChannels: string[] = ['core', 'auth', 'api', 'analytics', 'interactions', 'pubsub', 'storage', 'xr']

- Defined in core/src/Hub.ts:56

## Methods

### dispatch

- dispatch(channel: string, payload: HubPayload, source?: string, ampSymbol?: Symbol): void

- - Defined in core/src/Hub.ts:81

  #### Parameters

  - ##### channel: string

  - ##### payload: HubPayload

  - ##### Default value source: string = ""

  - ##### Optional ampSymbol: Symbol

  #### Returns void

### listen

- listen(channel: string | RegExp, callback?: HubCallback | LegacyCallback, listenerName?: string): void

- - Defined in core/src/Hub.ts:103

  #### Parameters

  - ##### channel: string | RegExp

  - ##### Optional callback: HubCallback | LegacyCallback

  - ##### Default value listenerName: string = "noname"

  #### Returns void

### remove

- remove(channel: string | RegExp, listener: HubCallback): void

- - Defined in core/src/Hub.ts:63

  #### Parameters

  - ##### channel: string | RegExp

  - ##### listener: HubCallback

  #### Returns void