Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "core/usePresenceChannel"

Index

Type aliases

MemberAction

MemberAction: { id: string; info?: Record<string, any> }

Type declaration

  • id: string
  • Optional info?: Record<string, any>

PresenceChannelState

PresenceChannelState: { count: number; me: Record<string, any> | undefined; members: Record<string, any>; myID: string | undefined }

Internal state

Type declaration

  • count: number
  • me: Record<string, any> | undefined
  • members: Record<string, any>
  • myID: string | undefined

ReducerAction

ReducerAction: { payload: Partial<PresenceChannelState> | MemberAction; type: typeof SET_STATE | typeof ADD_MEMBER | typeof REMOVE_MEMBER }

Type declaration

Variables

Const ADD_MEMBER

ADD_MEMBER: "add-member" = "add-member"

Const REMOVE_MEMBER

REMOVE_MEMBER: "remove-member" = "remove-member"

Const SET_STATE

SET_STATE: "set-state" = "set-state"

Presence channel reducer to keep track of state

Functions

Const presenceChannelReducer

usePresenceChannel

  • Parameters

    • channelName: string | undefined

    Returns usePresenceChannelValue

Generated using TypeDoc