Created
November 17, 2017 06:11
-
-
Save Ibro/4fdaa6c8e80941fa007e677b4ab3fc6b 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
this.state.hubConnection.on('sendToAll', (nick, receivedMessage) => { | |
const text = `${nick}: ${receivedMessage}`; | |
const messages = this.state.messages.concat([text]); | |
this.setState({ messages }); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment