Simon Willison’s Weblog

Subscribe

3rd February 2018

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

This is a quotation collected by Simon Willison, posted on 3rd February 2018.