Created
November 17, 2017 06:16
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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