Navigation.setDefaultOptions Does NOT work on V3.1.0!
Issue Description
Just create a fresh project RN0.60.5 & RNN 3.1.0, the Navigation.setDefaultOptions does not work!. actually Im about to never again use RNN in future projects! :(
Environment
- React Native Navigation version: 3.1.0
- React Native version: 0.60.5
- Platform(s) (iOS, Android, or both?): IOS
- Device info (Simulator/Device? OS version? Debug/Release?): Simulator iphone 8
I'm using it in V3. Did you set it before calling setRoot, as described in the docs? https://wix.github.io/react-native-navigation/#/docs/styling?id=enabling-persistent-styling-properties
It works in 3.0 but not in 3.1.
@Damar95 yes I did everything I could imagine! but there is no result!
@guyca Please help!
@mrxrinc Agreed it doesn't work. Downgrade to v3.0.0 for it to be resolve temporarily.
@mrxrinc Are all options you set don't work? Or is it a specific option?
Seems like its a iOS only bug. 3.1.0 works for me on android.
Navigation.setDefaultOptions({
layout: {
// componentBackgroundColor: 'lightgray',
direction: 'ltr',
},
statusBar: {
visible: true,
style: 'dark',
backgroundColor: 'rgb(85, 128, 0)',
},
topBar: {
visible: true,
background: {
color: 'rgb(85, 128, 0)',
},
},
bottomTabs: {
style: 'dark',
textColor: 'rgb(0, 0, 0)',
backgroundColor: 'rgb(85, 128, 0)',
},
bottomTab: {
iconColor: 'rgb(50, 50, 50)',
textColor: 'rgb(50, 50, 50)',
selectedIconColor: 'rgb(0, 0, 0)',
selectedTextColor: 'rgb(0, 0, 0)',
},
// backgroundImage: require('./../assets/img/background.jpg')
});
@guyca non working!
Navigation.setDefaultOptions({
topBar: {
visible: false,
drawBehind: true
},
layout: {
orientation: ['portrait'],
backgroundColor: '#32434C'
},
statusBar: {
blur: true,
drawBehind: true,
backgroundColor: '#00000011',
style: 'light'
}
})
Having the same problem on iOS. 3.0 works fine, but 3.1 doesn't
same issue here it's not working on ios ver: 3.1
Sorry for the trouble guys. I'm on this. Unfortunately the e2e which should have caught this bug was bugged as well 😕 I should have a fix by tomorrow, you can use 3.0.0 until then, thanks for your patience 👍
Alright, fixed in 3.1.1. Please let me know if there any more issues regarding defaultOptions
For me, v3.1.1. not solve my problem. =( Any idea??
React Native Navigation version: 3.1.0 React Native version: 0.60.5 Platform: IOS Device info: Simulator iphone X
For ios everything works fine v3.1.1 (just need to reinstall pods). But on android bottomTabs {visible: false, drawBehind: true} in setDefaultOptions doesn't work need to add option in each screen to work it correctly P/s (sorry for my English)
@guyca Still doesn't work! tried 'npm install --save [email protected]' also 'pod install'. None is working!
@mrxrinc, try cd ios && pod update. If still not working:
rm -rf ios/build
rm -rf ~/Library/Developer/Xcode/DerivedData
rm -rf lib
watchman watch-del-all
rm -rf node_modules
rm -rf $TMPDIR/npm-*
rm -rf $TMPDIR/haste-*
rm -rf $TMPDIR/metro-*
rm -rf $TMPDIR/haste-map-react-native-packager-*
npm install
then cd ios && pod update
I can confirm that updating to 3.1.2 fixed the issue. I didn't try 3.1.1 though.
I have 3.2.0 installed and can't change the statusBar style.
Same, I'm on 3.2.0 and this can't change the statusBar style either