Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actions.currentScene in Tabs with tabBarComponent will get wrong scene name #3534

Open
ibout360ps2 opened this issue Aug 11, 2019 · 2 comments

Comments

@ibout360ps2
Copy link

ibout360ps2 commented Aug 11, 2019

Version

Tell us which versions you are using:

  • react-native-router-flux 4.0.6
  • react 16.8.6
  • react-native 0.60.4

Expected behaviour

Actions.currentScene should be get correct scene name.

Actual behaviour

But it get _SceneName not SceneName

Steps to reproduce

For non-obvious bugs, please fork this component, modify Example project to reproduce your issue and include link here.
1.
2.
3.

Reproducible Demo

  1. App.js
            <Router>
                <Tabs key="tab" tabBarComponent={Footer}>
                    <Scene key="Home" component={Home} initial={true} />
                    <Scene key="Profile" component={Profile} />
                </Tabs>
            </Router>
  1. Home.js & Profile.js
            <View>
                <Text>Home</Text>
            </View>
            <View>
                <Text>Profile</Text>
            </View>
  1. Footer.js
            <View>
                <Button
                    title='Home'
                    color={Actions.currentScene === 'Home' ? '#000' : '#ccc'}
                    onPress={() => Actions.jump('Home')}>
                </Button>
                <Button
                    title='Profile'
                    color={Actions.currentScene === 'Profile' ? '#000' : '#ccc'}
                    onPress={() => Actions.jump('Profile')}>
                </Button>
            </View>
@quentingirard
Copy link

quentingirard commented Aug 20, 2019

Same here

Did you find a solution ?

@sfratini
Copy link

Dup #2802

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants