src/components/App.js
// dump state tree in string format
dump state tree in string format
dump state tree in string format
dumpState(item, depth = 1) {
    const MAX_DEPTH = 100
    depth = depth || 0
    let isString = typeof item === 'string'
    let isDeep = depth > MAX_DEPTH
    if (isString || isDeep) {
      console.log(item)
      return
    }
    for (var key in item) {
      console.group(key)
      this.dumpState(item[key], depth + 1)
      console.groupEnd();
    }
  }
dumpState ( item , depth = 1 ) { const MAX_DEPTH = 100 depth = depth || 0 let isString = typeof item === 'string' let isDeep = depth > MAX_DEPTH if ( isString || isDeep ) { console . log ( item ) return } for ( var key in item ) { console . group ( key ) this . dumpState ( item [ key ] , depth + 1 ) console . groupEnd ( ) ; } }
dump state tree in string format
dump state tree in string format
// if (depth == 1) console.log('\n')