A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/react-navigation/react-navigation/issues/1663 below:

proposal/fix: StackNavigator RESET action replaces with no animation unless action.direction = 'back'

Currently the StackNavigator's RESET functionality is half-baked. The various problems are highlighted in this older issue:

https://github.com/react-community/react-navigation/issues/351#issuecomment-303285227

I think I've come up with the simplest solution that solves the most use-cases:

StackNavigator RESET Behavior Proposal Notes:

Overall, this solves all problems regarding developer-control of whether the stack is replaced in place without animation vs having animation when it makes sense for the user. In addition, being able to choose direction is important because it's not always the case that if you have less routes you want a back transition. That's the developer's business, not the user's. There may be a perfectly good reason for this. That said auto is a must since when you want the reset animated, most of the time the difference in routes gets it right (and since having to dig into current state to make the comparison is a waste of developer energy). Lastly, as far as the 2 new keys introduced--perhaps for consistency they can simply be specialized keys on the params object.

ppong, elliottjro, augustoabreu, briankereszturi, nicgutierrez and 163 moreluco, gedeagas, Rinyeo, faustoct1, ErickMaeda and 2 moreqrobin, cccRaim, CarringtonCreative, jayprado, m1st1ck and 14 moreluco, gedeagas, peter-mach, Rinyeo, faustoct1 and 5 more


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4