docs: function (state, action) {
      if (state) {
        let initialValue = state.value || {}
        if (state.baseModel) {
          initialValue = recursiveClean(initialValue, state.baseModel)
          state.baseModel = getDereferencedModelSchema(state.baseModel)
          state.model = evaluateConditions(state.baseModel, initialValue, undefined, initialValue)
          // leave this undefined to force consumers to go through the proper CHANGE_VALUE channel
          // for value changes
          state.value = undefined
        }
        if (state.view && !state.baseView) {
          state.baseView = state.view
        }
        if (state.baseView) {
          state.view = evaluateViewConditions(state.baseView, initialValue)
        }
      }
  
      const newState = initialState(state || {})
      newState.lastAction = 'INIT'
      newState.value = immutable(newState.value)
      return newState
    }