Skip to content

Instantly share code, notes, and snippets.

@joaorodrs
Created July 5, 2021 20:35
Show Gist options
  • Save joaorodrs/1d0d091105c1c43cdf75e81ad41a659f to your computer and use it in GitHub Desktop.
Save joaorodrs/1d0d091105c1c43cdf75e81ad41a659f to your computer and use it in GitHub Desktop.
Solved issue with `react-native-modal` and `Flatlsist`
import React from 'react';
import Modal from 'react-native-modal';
import { Flatlist } from 'react-native';
const MyModal = ({ isVisible, onClose }) => {
return (
<Modal
isVisible={true}
onBackdropPress={onClose}
swipeDirection={null}
>
<Flatlist data={[...]} renderItem={() => ...} />
</Modal>
);
};
export default React.memo(MyModal);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment