Skip to content

Instantly share code, notes, and snippets.

@Ibro
Created November 17, 2017 06:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ibro/ef55eb4516bd115e61e7a4cd50ede9e5 to your computer and use it in GitHub Desktop.
Save Ibro/ef55eb4516bd115e61e7a4cd50ede9e5 to your computer and use it in GitHub Desktop.
ASP.NET Core SignalR chat with React.js - https://codingblast.com/asp-net-core-signalr-chat-react
render() {
return (
<div>
<br />
<input
type="text"
value={this.state.message}
onChange={e => this.setState({ message: e.target.value })}
/>
<button onClick={this.sendMessage}>Send</button>
<div>
{this.state.messages.map((message, index) => (
<span style={{display: 'block'}} key={index}> {message} </span>
))}
</div>
</div>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment