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

Remove navigation and navigationConfig from StackView, TabView #29

Open
aksonov opened this issue Mar 9, 2018 · 2 comments
Open

Remove navigation and navigationConfig from StackView, TabView #29

aksonov opened this issue Mar 9, 2018 · 2 comments

Comments

@aksonov
Copy link

aksonov commented Mar 9, 2018

I propose each navigation view like StackView, TabView should declare needed input properties directly as Props: goBack (for StackView), navigate, tabBarComponent (for TabView) state, descriptors and remove generic dispatch (use direct methods like completeTransition instead of dispatch(NavigationActions.completeTransition()))

This way API for views will become easier to understand.

@dantman
Copy link

dantman commented Mar 9, 2018

So, the programming pattern of passing navigation to children that need to navigate will no longer work?

Just a side note but passing a subset as an object to said component is not the same navigation={{goBack, navigate, state}}, unlike navigation it will completely de-optimize PureComponent even when navigation state does not change.

@satya164
Copy link
Member

It's implemented like this in React Navigation 5 (i.e. there's no navigationConfig, just regular props). We haven't exported the views yet, but something we'll do soon after ensuring that the public APIs look good.

Regarding removing navigation object, I'm not too sure about it coz it does makes things a bit more complex. But probably ok.

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