code: function update (state) {
      assert.ifError(inRenderingTransaction, 'infinite loop detected')
  
      // request a redraw for next frame
      if (currentState === null && !redrawScheduled) {
        redrawScheduled = true
  
        raf(function redraw () {
          redrawScheduled = false
          if (!currentState) return
  
          inRenderingTransaction = true
          var newTree = view(currentState)
          const patches = vdom.diff(tree, newTree)
          inRenderingTransaction = false
  
          target = vdom.patch(target, patches)
          tree = newTree
          currentState = null
        })
      }
  
      // update data for redraw
      currentState = state
    }
docs: update the state and render function obj -> null