magicismight / react-native-root-modal

A pure JavaScript solution for react native`s modal component
MIT License
367 stars 56 forks source link

the modal doesn't appear #11

Open xinwanggit opened 7 years ago

xinwanggit commented 7 years ago

I use it as this:

<Modal visible={this.state.modalVisible} style={{

                           top: 0,
                           right: 0,
                           bottom: 0,
                           left: 0,
                           justifyContent: 'center',
                           alignItems: 'center',
                           backgroundColor: 'rgba(0, 0, 0, 0)'}}>

           <View  style={{
                   borderRadius: 5,
                   alignItems: 'center',
                   padding:15,
                   backgroundColor: 'rgba(0, 0, 0, 0.5)'}}  >

                         <ActivityIndicator
                              color="#fff"
                              animating={true}
                              size="small"
                           />
               </View>

the visible has changed from false to true,but the modal cann't appear;but I change the this.state.modalVisible to true,it can appear...

can anyone help me ?? thx.

android:Emulator API 23, react-native:0.43

ls-maianneribeiro commented 3 years ago

Had the same issue after upgrading from RN 0.63.4 to RN 0.65.1. Adding import 'react-native-root-modal'; to index.js fixed it.