phoenix-to-redux
  • Overview
  • Installation
  • Quick Start
  • Reference
    • API Reference
      • Socket
        • Methods
          • disconnectPhoenix
          • connectPhoenix
        • Events
          • SOCKET_ERROR
          • SOCKET_OPEN
          • SOCKET_DISCONNECT
          • SOCKET_CLOSE
          • SOCKET_CONNECT
      • Channel
        • Methods
          • leavePhoenixChannel
          • leavePhoenixChannelEvents
          • leavePhoenixChannelEvent
          • getPhoenixChannel
          • pushPhoenixChannel
        • Events
          • CHANNEL_ERROR
          • CHANNEL_LEAVE
          • CHANNEL_JOIN_ERROR
          • CHANNEL_JOIN
          • CHANNEL_TIMEOUT
          • CHANNEL_PUSH_ERROR
          • CHANNEL_CLOSE
Powered by GitBook

Copyright (c) 2020 Trixta Inc

On this page

Was this helpful?

Export as PDF
  1. Reference
  2. API Reference
  3. Channel
  4. Methods

getPhoenixChannel

This method will subscribe phoenix channel for the given channelTopic and given events

PreviousleavePhoenixChannelEventNextpushPhoenixChannel

Last updated 2 years ago

Was this helpful?

import { getPhoenixChannel } from '@trixtateam/phoenix-to-redux';

Recommended that you already have made a socket connection by using method before using this method.

Parameters

Parameter
Description
Type
Required

channelTopic

Name of channel/Topic

string

logPresence

Determines if presence should be tracked for the channel

boolean

token

private token for channel

string

additionalData

This data will be available for you as additionalData on the response

object

events

Array of event names to subscribe to and will dispatch response to eventActionType

{

eventName:string; eventActionType:string

} []

domainUrl

socket endpoint to connect to

string

connectPhoenix