thorion3006/actioncable-client-react

Not able to use send and perform method

Closed this issue · 1 comments

as seen in Given example

                       <div>
				<ActionCable
					channel={'ChatRoom'}
					room={1}
					onReceived={this.handleReceived}
				/>
				<h2>Chat Room 1</h2>
				<h5>Messages</h5>
				<ul>
                {this.state.messages.map((message) =>
                    <li key={message.id}>{message.body}</li>
				)}
				</ul>
                <input onChange={this.onChange} type='text' />
				<button onClick={this.sendMessage} type='button'>
					Send
				</button>
			</div>

I'm trying to access send method but the thing is I'm not getting send or perform method in props.

How can I access send and perform method in React component?

Note: I've wrapped my component under ActionCableProvider already.

Figured it out so closing it and an example needs an update 😄