Skip to content

Instantly share code, notes, and snippets.

@ovpv
Created May 12, 2019 13:53
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 ovpv/827180cebead8f1fcb8695edb3dc21e0 to your computer and use it in GitHub Desktop.
Save ovpv/827180cebead8f1fcb8695edb3dc21e0 to your computer and use it in GitHub Desktop.
show Socket data in render method
render() {
const { data } = this.state;
return (
<div className="App">
<h2>Hello world</h2>
{Object.keys(data).map((key, index) => (
<div key={index}>
<div>{key}</div>
<div>{data[key]}</div>
</div>
))}
</div>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment