Skip to content

A slight rebuild/patch of React Native's Modal implementation to fix unmounting issues.

Notifications You must be signed in to change notification settings

HarvestProfit/react-native-modal-patch

Repository files navigation

react-native-modal-patch

Getting started

yarn add https://github.com/HarvestProfit/react-native-modal-patch.git

Install

cd ios && pod install

Usage

This is the same API as the react native modal https://facebook.github.io/react-native/docs/modal#docsNav.

import Modal from 'react-native-modal-patch';

//....
render() {
  return (
    <Modal
      animationType="slide"
      presentationStyle="pageSheet" // <-- Swipe down/dismiss works now!
      visible={this.state.modalVisible}
      onDismiss={() => this.setModalVisible(false)} // <-- This gets called all the time
    >
      {/* modal contents */}
    </Modal>
  );
  

About

A slight rebuild/patch of React Native's Modal implementation to fix unmounting issues.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published