Skip to content

Instantly share code, notes, and snippets.

Created Nov 17, 2017
What would you like to do?
ASP.NET Core SignalR chat with React.js -
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