Simon Willison’s Weblog

Subscribe

Just switched to {window.localStorage.getItem('debug') && <pre>{JSON.stringify(this.state, null, 2)}</pre>} - now I can ship to production and turn on debugging in my console with localStorage.setItem('debug', 1)

@simonw