Not able to use send and perform method
Closed this issue · 1 comments
jaypandya73 commented
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.
jaypandya73 commented
Figured it out so closing it and an example needs an update 😄