Same as https://github.com/facebook/react/issues/10103, but for the server renderer. You can look at implementation in https://github.com/facebook/react/pull/11168 and do something very similar in `ReactPartialRenderer.js`.
child: mixed,
  context: Object,
): {|
  child: mixed,
  context: Object,
|} {
  let element: ReactElement;
  let Component;
  let publicContext;
  let inst, queue, replace;
  let updater;
  let initialState;
  let oldQueue, oldReplace;
  let nextState, dontMutate;
  let partial, partialState;
  let childContext;
  let childContextTypes, contextKey;
  while (React.isValidElement(child)) {
    
    element = ((child: any): ReactElement);
    if (__DEV__) {
      pushElementToDebugStack(element);
    }