Skip to content

Instantly share code, notes, and snippets.

@ovpv

ovpv/App.js

Created May 12, 2019
Embed
What would you like to do?
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