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

Child scenes will not have working props #3086

Closed
SourceCipher opened this issue Jun 17, 2018 · 1 comment
Closed

Child scenes will not have working props #3086

SourceCipher opened this issue Jun 17, 2018 · 1 comment

Comments

@SourceCipher
Copy link

SourceCipher commented Jun 17, 2018

Version

Tell us which versions you are using:

  • react-native-router-flux: ^4.0.0-beta.31
  • react-native: ^0.55.3,

Expected behaviour

When I navigate to the scene and press back button, it should minimize the app (works if I add scenes without the tab)

Actual behaviour

if my app shows the albumList screen, on back button press it will go to the previous screen always. If I declare the screens from the tab, it will work just fine, but obviously the tab swiping functionality is gone.

Code

Here is my router:

        <Router>
            <Scene key="app">
                <Scene key="login" component={LoginForm} hideNavBar type={ActionConst.RESET}/>
                <Tabs key="tabbar" showLabel={false} tabs={true} hideNavBar style={{marginTop: -50}} type={ActionConst.RESET}>
                    <Scene key="chatView" component={ChatView} hideNavBar title='Contacts' type={ActionConst.RESET}/>
                    <Scene key="albumList" component={AlbumList} hideNavBar initial={true} title='Chats' type={ActionConst.RESET}/>
                    <Scene key="splash" component={Splash} hideNavBar title='Profile' type={ActionConst.RESET}/>
                </Tabs>
            </Scene>
        </Router>

I call the screens Actions.replace('albumList') and I think thats where the problem is, but calling Actions.albumList() will not work as it gives me an error

There is no route defined for key albumList

How do I make sure that the scenes which are within the Tab have all the props like type working the way they work if I declare them outside the Tab?

@aksonov
Copy link
Owner

aksonov commented Aug 8, 2018

Please try to reproduce it with Example project and latest version 4.0.0-beta.40. Feel free to open if the issue still exists

@aksonov aksonov closed this as completed Aug 8, 2018
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

2 participants