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`.
footer: string,
};
type FrameDev = Frame & {
  debugElementStack: Array<ReactElement>,
};
class ReactDOMServerRenderer {
  stack: Array<Frame>;
  exhausted: boolean;
  // TODO: type this more strictly:
  currentSelectValue: any;
  previousWasTextNode: boolean;
  makeStaticMarkup: boolean;
  constructor(children: mixed, makeStaticMarkup: boolean) {
    const flatChildren = flattenTopLevelChildren(children);
    const topFrame: Frame = {
      
      
      domNamespace: Namespaces.html,
      children: flatChildren,
      childIndex: 0,
      context: emptyObject,
      footer: '',
    };
    if (__DEV__) {
      ((topFrame: any): FrameDev).debugElementStack = [];
    }
    this.stack = [topFrame];
    this.exhausted = false;
    this.currentSelectValue = null;
    this.previousWasTextNode = false;