code: function() {
          var stateChanges = this.__stateChanges;
          var oldState = this.__oldState;
  
          var handlerMethod;
          var handlers = [];
  
          var newValue;
          var oldValue;
  
          for (var propName in stateChanges) {
              if (stateChanges.hasOwnProperty(propName)) {
                  newValue = stateChanges[propName];
                  oldValue = oldState[propName];
  
                  if (oldValue === newValue) {
                      // Only do an update for this state property if it is actually
                      // different from the old state or if it was forced to be dirty
                      // using setStateDirty(propName)
                      var dirtyState = this.__dirtyState;
                      if (dirtyState == null || !dirtyState.hasOwnProperty(propName)) {
                          continue;
                      }
                  }
  
                  var handlerMethodName = 'update_' + propName;
  
                  handlerMethod = this[handlerMethodName];
                  if (handlerMethod) {
                      handlers.push([propName, handlerMethod]);
                  } else {
                      // This state change does not have a state handler so return false
                      // to force a rerender
                      return false;
                  }
              }
          }
  
          // If we got here then all of the changed state properties have
          // an update handler or there are no state properties that actually
          // changed.
  
          if (!handlers.length) {
              return true;
          }
  
          // Otherwise, there are handlers for all of the changed properties
          // so apply the updates using those handlers
  
          emitLifecycleEvent(this, 'beforeUpdate');
  
          for (var i=0, len=handlers.length; i<len; i++) {
              var handler = handlers[i];
              var propertyName = handler[0];
              handlerMethod = handler[1];
  
              newValue = stateChanges[propertyName];
              oldValue = oldState[propertyName];
              handlerMethod.call(this, newValue, oldValue);
          }
  
          emitLifecycleEvent(this, 'update');
  
          resetWidget(this);
  
          return true;
      }
docs: This method is used to process "update_<stateName>" handler functions.
  If all of the modified state properties have a user provided update handler
  then a rerender will be bypassed and, instead, the DOM will be updated
  looping over and invoking the custom update handlers.
  @return {boolean} Returns true if if the DOM was updated. False, otherwise.