Created
May 12, 2019 13:53
-
-
Save ovpv/827180cebead8f1fcb8695edb3dc21e0 to your computer and use it in GitHub Desktop.
show Socket data in render method
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() { | |
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