Comments (23)
@spruce-bruce Can't we have a more generic API that might be more expandable in the future?
e.g. like
props.navigation.navigate({
screen: `Screen`,
params: {},
transitionConfig: {}
})
I prefer having a single object with sub-properties over having list of arguments
from rfcs.
This is related - have you thought much about allowing the ability to override transitions per navigate call as well? It's kind of edge casey, but I can imagine creating a screen and wanting to choose at time of navigation how the transition will happen.
props.navigation.navigate('Screen', params, transitionConfigOverride)
?
from rfcs.
Any update on this?
from rfcs.
you can do this in v5. https://www.youtube.com/watch?v=PvjV96CNPqM. just use options
on screen instead of on navigator
from rfcs.
Would be awesome if there is also a way to specify the gestures for that screen. E.g. using the example of your Problem section results in a gesture that do not match the animation.
from rfcs.
What @spruce-bruce said above is what I need. My use case is a button that the user can tap to push a screen (with animation), versus me wanting to programmatically push that screen without animation when something else happens.
from rfcs.
stack is being rewritten - react-navigation/stack#131
from rfcs.
@kaantyy: https://github.com/react-navigation/react-navigation-stack/blob/dab7f2515e2bc7c3b57a89a23f9c3ed2dfdece44/src/index.js#L28-L42
from rfcs.
I have the same fix! But as @n1ru4l pointed out, the gesture direction is defined by mode
. Would be handy to dynamically configure the gesture direction based on sceneProps.
from rfcs.
@brentvatne if I'm not mistaken. since react-navigation/react-navigation@e27ad22, transitionConfig has had these parameters already. And it's working right now. is it safe to use it now? since the documentation hasn't been updated.
from rfcs.
@jemmyphan - I don't think so -- this works the same as before after that commit unless I'm missing something
from rfcs.
@brentvatne I totally missed react-navigation/react-navigation@2ee8548. 😅
from rfcs.
Certainly - I wouldn't be dogmatic about the api example I gave, just showing "fewest api changes" possible example to highlight the idea
from rfcs.
options specified per screen will always take priority over options specified globally.
Is this in react-navigation 2? Because it don't work on my navigator, using it per screen basis.
from rfcs.
Just wanted to jump on board here and say that coming from ex-navigation this feels like an area that's lacking.
We use modals and stacks within tabs fairly interchangeably and made heavy use of specifying the following when using ex-navigation:
static route = {
styles: {
...NavigationStyles.FloatVertical,
},
}
on screens which we wanted to appear as modals.
The initial proposal from @satya164 is fairly similar similar to this - is there anyone working on this which I can help out with or does this need starting afresh?
from rfcs.
@spruce-bruce @n1ru4l I think that's also possible with the proposed API. You'll need to pass some param which you can check in the transition config to return a different animation.
from rfcs.
I cannot find CardStackStyleInterpolator.
Any workaround?
from rfcs.
@fbn4sc the CardStackStyleInterpolator has been replaced by StackViewStyleInterpolator
you can Import it by adding
import StackViewStyleInterpolator from 'react-navigation/src/views/StackView/StackViewStyleInterpolator';
remeber also to switch props in sceneProps
from rfcs.
@Sixbitunder
Thanks for your answer, it works.
when I swipe the page from left to right on android, how could navigation “go back” just like the ios gesture.
from rfcs.
I cannot find either CardStackStyleInterpolator or StackViewStyleInterpolator.
Workaround with v2.14.2?
from rfcs.
This would be an amazing addition.
from rfcs.
:(
from rfcs.
Are there any news on this @brentvatne ?
from rfcs.
Related Issues (20)
- Action property that indicates to routes that they should not change index HOT 1
- Improve ergonomics of back HOT 1
- Navigator config to pass params down HOT 1
- Add unsetParams to navigation prop HOT 2
- Reset state action HOT 2
- Expose logic for initializing state of createAppContainer HOT 4
- On will/didFocus subscribe, stop firing the listener if current screen is focused HOT 2
- Idea: Preloading HOT 6
- <StaticNavigator> for tests/storybook HOT 14
- StackActions.popToRouteName(routeName) HOT 2
- Alternative API for defining navigators HOT 12
- how to send navigation events between peer navigators? HOT 4
- Deep linking with authentication
- How to hide tab bar item n react-navigation HOT 3
- Ability to show screens on top of native modals
- useNavigationParams hook HOT 1
- Add useMaterialTabsHeight HOT 1
- Typesafe Stack & Navigation HOT 1
- devTools prop HOT 5
- [RFC] TabView API change
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rfcs.