I am new to React Native and currently learning on developing a chat app.
I have a Modal
that contain Rating UI
Working with these approach
ChatScreen.js
<Modal isVisible={showRateModal} >
<RatingModal />
</Modal>
RatingModal.js
<View style={styles.container}>
<RatingEmojiSection />
<View style={styles.buttonContainer}>
<Button/>
</View>
</View>
Not Working
It works all fine but when I move `Modal` into `RatingModal.js`, the Modal wont be showing anymore. Here is my approach
import { Modal } from 'react-native-paper';
<Modal isVisible={showRateModal} >
<View style={styles.container}>
<RatingEmojiSection />
<View style={styles.buttonContainer}>
<Button/>
</View>
</View>
</Modal>
Anyone have idea why this could happen? PS: the showRateModal
state is working fine. I just curious why can't I move the Modal
wrapper into RatingModal.js
?