* Pop to top when tapping the tab icon for an already focused tab
* Dispatch popToTop with key to scope the action properly
* Add test for POP_TO_TOP with key
* First crack at publish from circle
* s/publish/deploy
* Update snapshots
* Try installing with yarn
* Nice one
* Shhh
* Comment some things out and add a webhook
* Add proper webhook url and add back build steps
* Improve `Header` performance a bit
I have been investigating `<Header />` component performance once again today with `render` cycles in particular. I have observed that during `push` phase, a typical Header in NavigationPlayground re-renders 3 times on iOS and 2 times on Android.
The first time is obvious on both platforms since that's when we add a new scene to an array. Second on iOS was also self-explanatory - we measure title width and other layout parameters in order to provide a better animation.
What got me thinking was the last render cycle that didn't have a clear origin. After digging around I've found it is caused by a `scenes` array changing when transition finishes. What is surprising, it's just the reference to the object that changes, the content (items inside) stay the same.
I have found out that this is caused by `Transitioner` looping through an array of scenes attempting to remove stale scenes. Since scene becomes stale when you `pop` from it, this is obviously a noop when `pushing` a new route. That, obviously, causes an extra render cycle since `filter` produces same, but with a different pointer, object.
* Update Transitioner.js
* Update Transitioner.js
* Move the back button handler subscription to the constructor to fix precedence
- See 07d92947a1/src/Navigation.js (L190-L193)
* Return the boolean result of dispatch in global back handler
* Lazy initialization of tabs and move contents off-screen when not active
* Make subview clipping and lazy both configurable
* Record snapshots again
* Update type definition
* Remove unused log
* add getParam helper
* passing tests
* check for existence of param instead of just or
* fix spacing
* use in instead of checking for null
* add test for null
The most straightforward fix for two issues is to block all navigation actions while mid-transition of a stack navigator. This will fix:
The double-navigate on double tap issue, because the first navigation will start the transition and the second action will be ignored.
Will fix the buggy header experience that you can see when going back and forward to a different route quickly. This happens because the next navigate action happens before the completion action. After the fix, the navigate action will be ignored, the user will tap again, and will see a good transition
Previously the state was getting squashed, in this case it would destroy the routeName of the state, which was a route for the parent navigator, who could no longer render properly.