title: What are the equivalent variables for ReactDOM and document.body in React Native? (Expo)
body: <p>I'm building a <code>Modal</code> component based on which I used for ReactJS on the web. I attach the <code>Modal</code> to <code>document.body</code> as a child and mount/unmount as needed. </p>
  
  <p>Here is the diagram (Stephen Grider's Udemy online course)
  <a href="https://i.stack.imgur.com/YW4Qo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YW4Qo.png" alt="enter image description here"></a></p>
  
  <p><strong>My problem is there is no ReactDOM or document.body in React Native.</strong> Here is my modal.py</p>
  
  <pre><code>import React, { Component } from 'react';
  import ReactDOM from 'react-dom';
  import { store } from '../store';
  import { Provider } from 'react-redux';
  class Modal extends Component {
    comoponentDidMount() {
      this.modalTarget = document.createElement('div');
      this.modalTarget.className = 'modal';
      document.body.appendChild(this.modalTarget);
      this._render();
    }
  
    _render() {
      ReactDOM.render(
        &lt;Provider store={store}&gt;
          &lt;div&gt;{this.props.children}&lt;/div&gt;
        &lt;/Provider&gt;,
        this.modalTarget
      );
    }
  
    componentWillUpdate() {
      this._render();
    }
  
    componentWillUnmount() {
      ReactDOM.unmountComponentAtNode(this.modalTarget);
      document.body.removeChild(this.modalTarget);
    }
  
    render() {
      return &lt;noscript /&gt;;
    }
  }
  </code></pre>
  
  <p><strong>I'm using Expo and it's loading App.js by default! And there is no document.body and ReactDOM</strong>. How can I solve this problem? </p>