Refactor <NavigationHeader /> API.

Summary:- All the public sub component renderers should implement the interface
  NavigationSceneRenderer, which will help to reuse renderer or
  replace renders for different composition.

- Perf improvement. <NavigationHeader /> is rendering way more
  sub component than necessary, we shall fix that.

- No UI or behavior change.

Reviewed By: ericvicenti

Differential Revision: D3091442

fb-gh-sync-id: fba5f7ce74597fa6036b5b216c02b06052801983
shipit-source-id: fba5f7ce74597fa6036b5b216c02b06052801983
This commit is contained in:
Hedger Wang
2016-03-24 15:48:27 -07:00
committed by Facebook Github Bot 9
parent 433fb336af
commit 62e80a600e
7 changed files with 324 additions and 168 deletions

View File

@@ -107,3 +107,8 @@ export type NavigationReducer = (
export type NavigationSceneRenderer = (
props: NavigationSceneRendererProps,
) => ?ReactElement;
export type NavigationStyleInterpolator = (
props: NavigationSceneRendererProps,
) => Object;