Skip to content

Instantly share code, notes, and snippets.

@Aslemammad
Created July 13, 2020 09:34
Show Gist options
  • Save Aslemammad/f2b36beb7ee68f2c0e5453abe1b7f933 to your computer and use it in GitHub Desktop.
Save Aslemammad/f2b36beb7ee68f2c0e5453abe1b7f933 to your computer and use it in GitHub Desktop.
App.js
import React from 'react';
import { Reoverlay, ModalContainer } from 'reoverlay';
import { AuthModal, DeleteModal, ConfirmModal } from '../modals';
// Here you pass your modals to Reoverlay
Reoverlay.config([
{
name: "AuthModal",
component: AuthModal
},
{
name: "DeleteModal",
component: DeleteModal
},
{
name: "ConfirmModal",
component: ConfirmModal
}
])
const App = () => {
return (
<>
...
<Routes />
...
<ModalContainer />
</>
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment