Last active
August 22, 2018 00:49
-
-
Save basarat/5e2b0bb0d115c1732f63a96f3125a1c6 to your computer and use it in GitHub Desktop.
Debug JavaScript objects in TypeScript React
This file contains hidden or 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
export const Pre: React.SFC<{ children: any }> = (props) => { | |
return <pre>{JSON.stringify(props.children, null, 2)}</pre> | |
} |
This file contains hidden or 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
import {Pre} from './pre'; | |
// in some render | |
render() { | |
return <Pre>{{example: 123}}</Pre> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment