Closed root-io closed 1 year ago
Hey! Thanks for opening the issue. The issue doesn't seem to contain a link to a repro (a snack.expo.dev link or link to a GitHub repo under your username).
Can you provide a minimal repro which demonstrates the issue? A repro will help us debug the issue faster. Please try to keep the repro as small as possible and make sure that we can run it without additional setup.
Couldn't find version numbers for the following packages in the issue:
react-native-vector-icons
yarn
expo
Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3.
The versions mentioned in the issue for the following packages differ from the latest versions on npm:
react-native
(found: 0.68.2
, latest: 0.69.0
)react-native-paper
(found: 5.0.0-rc.2
, latest: 4.12.1
)npm
(found: 8.11.0
, latest: 8.13.1
)Can you verify that the issue still exists after upgrading to the latest versions of these packages?
Couldn't find version numbers for the following packages in the issue:
react-native-vector-icons
yarn
expo
Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3.
The versions mentioned in the issue for the following packages differ from the latest versions on npm:
react-native-paper
(found: 5.0.0-rc.2
, latest: 4.12.1
)react-native
(found: 0.68.2
, latest: 0.69.0
)npm
(found: 8.11.0
, latest: 8.13.1
)Can you verify that the issue still exists after upgrading to the latest versions of these packages?
Hey @root-io, thanks for reporting the issue. Could you please create a simple snack presenting the bug or create minimal repo?
Here we go https://snack.expo.dev/Or6P1NqOC
Ok, I've found the problem - we have to update the material-bottom-tabs
since it's using old paper version and using themes DefaultTheme
and DarkTheme
which don't exist in paper anymore.
Ok, I've found the problem - we have to update the
material-bottom-tabs
since it's using old paper version and using themesDefaultTheme
andDarkTheme
which don't exist in paper anymore.
how did you manage to solve it?
Maybe I'm not fully understanding what's going on here, but I am very confused why it is even dealing with themes at all here:
Shouldn't the <BottomNavigation/>
component already inherit and handle theming correctly on its own, since passing it in explicitly is optional anyway? Would it be reasonable to just get rid of it here?
I'm not entirely sure why navigation needs to deal with theming in the first place. Can't it just treat those props as opaque?
+1
Any updates on this ?
I fixed it in this package: https://www.npmjs.com/package/@juliushuck/react-native-navigation-material-bottom-tabs
I will be using it until this issue is resolved.
This is the change that was required: https://github.com/react-navigation/react-navigation/commit/78f2ee6fdb721b47a63007d5853db2c35164d219
This has been fixed on both the react-native-paper side in version 5.0.0-rc.4 and on the react-navigation side after this commit I tried this in my application and it's working correctly so far. (The example app on react-navigation still isn't using v5, though)
This is still an issue in version 5.0.2.
This is still an issue in version 5.0.3.
Still an issue in "react-native-paper": "^5.12.3"
and "@react-navigation/material-bottom-tabs": "^6.2.28"
.
Anyone knows a fix? Or do we still have to patch package material-bottom-tabs one year later as @juliushuck did above?
As mentioned here https://github.com/react-navigation/react-navigation/pull/11219#issuecomment-1464870188 you could import the MD3 theme, which I did:
import {
MD2Colors as Colors,
MD3DarkTheme as PaperDarkTheme,
MD3LightTheme as PaperDefaultTheme,
Provider as PaperProvider,
} from 'react-native-paper';
But react-navigation still havn't released an update to this change and is therefore breaking?
Current behaviour
Expected behaviour
No error, it was working with react-native-paper v4.12.1
Code sample
Your Environment