code: function observer(name, view) {
  	// If no name provided for the observer:
  	if (view === undefined) {
  		view = name;
  
  		// Generate friendly name for debugging (See: https://github.com/infernojs/inferno/blob/master/packages/inferno-mobx/src/observer.ts#L105)
  		name = view.displayName || view.name || (view.constructor && (view.constructor.displayName || view.constructor.name)) || '<View>';
  	}
  
  	// The name for the MobX Reaction, for debugging:
  	var reactionName = name + ".render()";
  
  
  	// We need to hook into the init() of the vm, just after that init() is executed,
  	// so that all the vm.config(...) have been executed on the vm.
  	// This is a bit complex depending on the type of the view.
  	// Refer to the ViewModel constructor for details:
  	//	 https://github.com/domvm/domvm/blob/3.4.8/src/view/ViewModel.js#L48
  
  	if (isPlainObj(view)) {
  		// view is an object: just set our own init on it.
  		wrapInit(view, reactionName);
  	}
  	else {
  		// view is a function: we can't do anything before it is executed, so we wrap it
  		// with a function that will set our own init later.
  		view = (function(view) {
  			return function(vm) {
  				var out = view.apply(this, arguments);
  
  				if (isFunc(out))
  					wrapInit(vm, reactionName);
  				else {
  					// In case multiple executions of view() returns the same object,
  					// we want to wrap init only once:
  					wrapInitOnce(out, reactionName);
  				}
  
  				return out;
  			};
  		})(view);
  	}
  
  	return view;
  }
docs: Turns a view into a domvm-MobX observer view: