React with Native

Bringing together React and React Native

GitHub
NB: Experimental package!
Setup
  1. Install
yarn add react-with-native-modal
  1. Wrap your whole app in the ModalProvider
import { ModalProvider } from "react-with-native-modal";

// and

<ModalProvider>
  <YourApp />
</ModalProvider>;
Usage

Whenever you need a modal, use this hook:

import { useModal } from "react-with-native-modal";

// and

const { handleModal } = useModal();

// and then

<Button onClick={() => handleModal(Element | string)}>Show a modal</Button>;