The below wrapper is used to support legacy context API with Context.Consumer
render prop. We need it as we want to access `context` from within
`componentDidMount` callback. If we decided to drop support for older
react native we could rewrite it using hooks or `static contextType` API.
function wrapTransitioningContext(Comp) {
  return props => {
    return (
      <TransitioningContext.Consumer>
        {context => <Comp context={context} {...props} />}
      </TransitioningContext.Consumer>
    );
  };
}