I realized that the refactor to use ReactDebugCurrentFrame as a decoupled stack frame for error messages is not reentrant: https://github.com/facebook/react/pull/10105/files#r127573520

Fiber is not reentrant but other renderers might be. The synchronous server renderer is atm.

We should add tests for warnings between renderers, such as calling a server-render from within a client render, and update the set/reset callsites to use push/pop instead to account for that.

getChildContext() {
          return {
            text: 'hello, world',
          };
        }
        render() {
          return this.props.children;
        }
      }
      ContextProvider.childContextTypes = {
        text: PropTypes.string,
      };
      const markup = ReactDOMServer.renderToString(
        <ContextProvider>
          <Component />
        </ContextProvider>,
      );
      expect(markup).toContain('hello, world');
    });
    it('renders with new context API', () => {
      const Context = React.createContext(0);
      function Consumer(props) {
        return (
          <Context.Consumer>{value => 'Result: ' + value}</Context.Consumer>
        );
      }
      const Indirection = React.Fragment;
      function App(props) {