Created
July 5, 2021 20:35
-
-
Save joaorodrs/1d0d091105c1c43cdf75e81ad41a659f to your computer and use it in GitHub Desktop.
Solved issue with `react-native-modal` and `Flatlsist`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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