Created
February 22, 2019 06:52
-
-
Save aamnah/daac404052b33a4382f73777204dd2ae to your computer and use it in GitHub Desktop.
Dump state inside React Components
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
<pre> | |
<code>{JSON.stringify(this.state.blah, null, 2)}</code> | |
</pre> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
the third argument for
JSON.stringify
is space. In other words, the tab width for indentation.