Skip to content

Instantly share code, notes, and snippets.

@aamnah
Created February 22, 2019 06:52
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 aamnah/daac404052b33a4382f73777204dd2ae to your computer and use it in GitHub Desktop.
Save aamnah/daac404052b33a4382f73777204dd2ae to your computer and use it in GitHub Desktop.
Dump state inside React Components
<pre>
<code>{JSON.stringify(this.state.blah, null, 2)}</code>
</pre>
@aamnah
Copy link
Author

aamnah commented Feb 22, 2019

the third argument for JSON.stringify is space. In other words, the tab width for indentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment