Closed ivanguimam closed 4 years ago
Same here on android, works fine on ios, it kept crashing whenever the botomTab screen
Android has to have an icon option or it will break.
Navigation.setRoot({
root: {
bottomTabs: {
children: [
{
stack: {
children: [
{
component: {
name: 'Example',
},
},
],
options: {
bottomTab: {
icon: require('./img.png'), <----- fix
},
},
},
},
],
},
},
});
@abdullah-sr I set up the icon.
children: [
{
component: { name: 'HOME_HOME', id: "HOME_HOME_ID", passProps: { navType: "ROOT", tabIndex: 0 } },
},
{
component: { name: "NEWS_NEWS_LIST", id: "NEWS_LIST_COMPONENT_ID", passProps: { navType: "SUB_PAGE", tabIndex: 0 } },
},
{
component: { id: "ID_OTHER", name: "USER_PROFILE_UPDATE" },
},
],
options: {
bottomTab: { HERE -----> icon: 8, iconColor: "#B3B3B3", selectedIconColor: "#1A783D", selectedTextColor: "#1A783D", tabIcon: HomeIconTab },
},
If I set up the stack with 2 screens works correctly, now if set up with 3 screens or more, does not work.
I believe icon must be and image, as show by it's type here
export interface OptionsBottomTab {
icon?: ImageRequireSource;
}
I have the icon item but it does not work
https://wix.github.io/react-native-navigation/#/docs/third-party?id=react-native-vector-icons
here they add some explanation on how to use both libraries. hope it's helpful
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.
The issue has been closed for inactivity.
Issue Description
I use setRoot and pass bottomTabs, if bottomTabs contains more than one stack, it will crash, only one stack will works well.
OBS: This problem occurs when I have more than 2 screens on the stack
It works good on iOS.
Steps to Reproduce / Code Snippets / Screenshots
package.json
Environment