ModalRoot

The ModalRoot component is where all modal type components will render. This should be somewhere inside your App tree, preferably at the very end. By placing this component at the end of your tree, it will ensure that all modals will be created as the last child in the DOM.

Copy
Copied
const App = () => (
  <Fragment>
    <Header />
    <Body />
    <Footer />
    <ModalRoot />
  </Fragment>
);
<ModalProvider>
  <App />
</ModalProvider>;
Copyright © Norce 2023. All right reserved.