ModalProvider
Note: ModalProviderwraps its children inside a Fragment so feel free to put as many siblings as you want inside of it (no need to wrap them inside a View/Fragment before passing the content toModalProvider).
import React from 'react'
import { ModalProvider, createModalStack } from 'react-native-modalfy'
import Navigation from './navigation'
import { ErrorModal } from './components/Modals'
const modalConfig = { ErrorModal }
const defaultOptions = { backdropOpacity: 0.6 }
const stack = createModalStack(modalConfig, defaultOptions)
const App = () => (
<ModalProvider stack={stack}>
<Navigation />
</ModalProvider>
)
export default AppLast updated
Was this helpful?