mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-03-26 01:04:20 +08:00
Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b54874969d | ||
|
|
ef0c8487b0 | ||
|
|
ea002fe950 | ||
|
|
41cf95941f | ||
|
|
884bde0338 | ||
|
|
31e07e9692 | ||
|
|
363f06d30e | ||
|
|
59c09a6040 | ||
|
|
c4b039cc19 | ||
|
|
49e3fb0d97 | ||
|
|
3367501d4d | ||
|
|
4fb6b163ac | ||
|
|
d0b4ba40e9 | ||
|
|
1be5c7ae35 | ||
|
|
bfa68ded1e | ||
|
|
2d3f159c2a | ||
|
|
e0fb642490 | ||
|
|
d341162731 | ||
|
|
4eec187d66 | ||
|
|
03be0324a3 |
357
CHANGELOG.md
357
CHANGELOG.md
@@ -7,248 +7,119 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [3.1.4] - [2019-02-05](https://github.com/react-navigation/react-navigation/releases/tag/3.1.4)
|
||||
|
||||
## Fixed
|
||||
|
||||
- Fix references to onGestureFinish in StackViewLayout, should be onGestureEnd
|
||||
|
||||
## [3.1.3] - [2019-02-04](https://github.com/react-navigation/react-navigation/releases/tag/3.1.3)
|
||||
|
||||
## Fixed
|
||||
|
||||
- Stack navigator properly dismisses and restores keyboard when gesture starts and is cancelled
|
||||
- Transparent header measurement fix (https://github.com/react-navigation/react-navigation-stack/pull/71)
|
||||
|
||||
## [3.1.2] - [2019-02-01](https://github.com/react-navigation/react-navigation/releases/tag/3.1.2)
|
||||
|
||||
## Fixed
|
||||
|
||||
- Update flow definition for `withNavigation` and `withNavigationFocus` to support `defaultProps`
|
||||
- Prevent onRef callback be called twice on withNavigationFocus components (https://github.com/react-navigation/react-navigation-core/pull/30)
|
||||
- Bump react-navigation-drawer version to improve performance - if you use Expo, you will need expo@^32.0.3 to update!
|
||||
|
||||
## [3.0.9] - [2018-12-19](https://github.com/react-navigation/react-navigation/releases/tag/3.0.9)
|
||||
|
||||
## Fixed
|
||||
|
||||
- Intermittent flicker when changing tabs while using react-native-screens fixed by not changing opacity (https://github.com/react-navigation/react-navigation-tabs/pull/80)
|
||||
- Prevent fading the previous screen on push/pop on Android (https://github.com/react-navigation/react-navigation-stack/pull/73)
|
||||
|
||||
## [3.0.8] - [2018-12-08](https://github.com/react-navigation/react-navigation/releases/tag/3.0.8)
|
||||
|
||||
## Changed
|
||||
|
||||
- Lock create-react-context to 0.2.2
|
||||
|
||||
## [3.0.7] - [2018-12-08](https://github.com/react-navigation/react-navigation/releases/tag/3.0.7)
|
||||
|
||||
## Changed
|
||||
|
||||
- Optimize stack gesture to avoid a setState and reduce unnecessary Animated node creation (https://github.com/react-navigation/react-navigation-stack/pull/70)
|
||||
|
||||
## [3.0.6] - [2018-12-06](https://github.com/react-navigation/react-navigation/releases/tag/3.0.6)
|
||||
|
||||
## Fixes
|
||||
|
||||
- Fix drawer accessibility label when drawer label is not a string
|
||||
|
||||
|
||||
## [3.0.5] - [2018-12-03](https://github.com/react-navigation/react-navigation/releases/tag/3.0.5)
|
||||
|
||||
## Fixes
|
||||
|
||||
- Fix crash in rare case where onNavigationStateChange on container leads to setState and container has screenProps (https://github.com/react-navigation/react-navigation/issues/5301)
|
||||
- Expose underlaying ScrollView methods to NavigationAwareScrollable (https://github.com/react-navigation/react-navigation-native/pull/8)
|
||||
|
||||
## [3.0.4] - [2018-11-30](https://github.com/react-navigation/react-navigation/releases/tag/3.0.4)
|
||||
|
||||
## Changed
|
||||
|
||||
- Lock dependencies to exact versions
|
||||
|
||||
## Fixes
|
||||
|
||||
- Fix crash when screenInterpolator is null (https://github.com/react-navigation/react-navigation-stack/issues/64)
|
||||
- Fix renderPager override (https://github.com/react-navigation/react-navigation-tabs/pull/70)
|
||||
|
||||
## Added
|
||||
|
||||
- Accessibility labels on drawer items (https://github.com/react-navigation/react-navigation-drawer/pull/30)
|
||||
|
||||
|
||||
## [3.0.3] - [2018-11-30](https://github.com/react-navigation/react-navigation/releases/tag/3.0.3)
|
||||
|
||||
## Fixes
|
||||
|
||||
- Fix bug where if you navigate immediately when the navigator is first mounted the stack could get in an invalid state.
|
||||
- Transparent stack card factors in header height now, even though you probably won't want to use this.
|
||||
- Fix bug where shadow was still rendered on transparent stack
|
||||
- Fix gestureResponseDistance custom values being ignored for modal stack
|
||||
|
||||
## [3.0.2] - [2018-11-27](https://github.com/react-navigation/react-navigation/releases/tag/3.0.2)
|
||||
|
||||
## Fixes
|
||||
|
||||
- Fix `drawerLockMode` on drawer navigator
|
||||
- Fix RTL support in drawer navigator
|
||||
|
||||
## [3.0.1] - [2018-11-26](https://github.com/react-navigation/react-navigation/releases/tag/3.0.1)
|
||||
|
||||
## Fixes
|
||||
|
||||
- fix NavigationTestUtils.js deprecated file import.
|
||||
|
||||
- Update `getParam` flow typings to check `key` and `fallback` arguments, as well as return the correct type automatically.
|
||||
|
||||
## [2.17.0] - [2018-09-25](https://github.com/react-navigation/react-navigation/releases/tag/2.17.0)
|
||||
|
||||
### Changed
|
||||
|
||||
- Add `dangerouslyGetParent()` to flow typings
|
||||
- Update react-navigation-stack to 0.7.0
|
||||
- Add transparentCard option to fix cards with a transparent bg when using rn-screens
|
||||
- Add window dimensions for iPhone XS Max and iPhone XR
|
||||
- Vendor clamp
|
||||
- Add overflow hidden to stack container
|
||||
- Completion on mount: StackView is responsible for calling the navigation completion action when `state.isTransitioning` is set. This fix handles that case when the stack is first mounting.
|
||||
|
||||
## [2.16.0] - [2018-09-19](https://github.com/react-navigation/react-navigation/releases/tag/2.16.0)
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated react-navigation-stack to 0.6.0 to make react-native-screens a peerDependency.
|
||||
- Updated react-navigation-tabs to 0.8.2 to make react-native-screens a peerDependency and add support for it in bottom tab navigator.
|
||||
- Make react-native-screens a direct dependency of react-navigation.
|
||||
|
||||
## [2.15.0] - [2018-09-19](https://github.com/react-navigation/react-navigation/releases/tag/2.15.0)
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated react-navigation-safe-area-view to 0.11.0 to support iPhoneXS Max and iPhoneXR.
|
||||
|
||||
## [2.14.2] - [2018-09-14](https://github.com/react-navigation/react-navigation/releases/tag/2.14.2)
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated react-navigation-stack to 0.5.1 to clamp interpolated values in animations.
|
||||
|
||||
## [2.14.1] - [2018-09-14](https://github.com/react-navigation/react-navigation/releases/tag/2.14.1)
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated react-navigation-stack to 0.5.0 to solve black screen on back and unpressable header area with hidden header when using react-native-screens.
|
||||
|
||||
## [2.14.0] - [2018-09-12](https://github.com/react-navigation/react-navigation/releases/tag/2.14.0)
|
||||
|
||||
### Added
|
||||
|
||||
- Updated react-navigation-stack to add experimental support for react-native-screens. See https://github.com/kmagiera/react-native-screens for information about how to enable it.
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated react-native-safe-area-view to 0.10.0 to solve circular dependency issue (fixes https://github.com/react-navigation/react-navigation/issues/4973)
|
||||
|
||||
## [2.13.0] - [2018-09-06](https://github.com/react-navigation/react-navigation/releases/tag/2.13.0)
|
||||
|
||||
### Added
|
||||
|
||||
- When `tabBarIcon` is a function it is now provided with a `horizontal` option that indicates whether horizontal tabs are being rendered (label to the right of the icon) or not.
|
||||
- Add some missing flow types ([1](https://github.com/react-navigation/react-navigation/pull/4836), [2](https://github.com/react-navigation/react-navigation/pull/4917)).
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated react-navigation-stack to 0.3.0.
|
||||
- Updated react-navigation-tabs to 0.7.0.
|
||||
- Pinned `create-react-context` dependency to `0.2.2` (https://github.com/react-navigation/react-navigation/issues/4934)
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixes tab label font sizes in landscape and portrait.
|
||||
- Default tab bar background color and header background color are white on iOS.
|
||||
|
||||
## [2.12.1] - [2018-08-23](https://github.com/react-navigation/react-navigation/releases/tag/2.12.1)
|
||||
|
||||
### Fixed
|
||||
- Fix crash on react-native@>=0.56 described in https://github.com/react-navigation/react-navigation/issues/4886
|
||||
|
||||
## [2.12.0] - [2018-08-22](https://github.com/react-navigation/react-navigation/releases/tag/2.12.0)
|
||||
|
||||
### Changed
|
||||
- Move stack specific view code to react-navigation-stack
|
||||
- Add accessibility props for inactive screens in stack (https://github.com/react-navigation/react-navigation-stack/commit/4e04428e26df9076413b57b3346a7ce357de1a77)
|
||||
- Updated header title to match iOS 11/12 style correctly (https://github.com/react-navigation/react-navigation-stack/pull/1)
|
||||
- Add support for animating the header background on screen transitions and add interpolator to animate it along with the rest of the screen, but this is still opt-in behavior (https://github.com/react-navigation/react-navigation-stack/pull/3)
|
||||
- Updated react-native-safe-area-view to 0.9.0
|
||||
|
||||
## [2.11.2] - [2018-08-03](https://github.com/react-navigation/react-navigation/releases/tag/2.11.2)
|
||||
### Changed
|
||||
- Revert rename of pathUtils
|
||||
|
||||
## [2.11.1] - [2018-08-03](https://github.com/react-navigation/react-navigation/releases/tag/2.11.1)
|
||||
### Changed
|
||||
- Fix some exports related to the 2.11.0 changes to move stack navigator out of core
|
||||
|
||||
## [2.11.0] - [2018-08-03](https://github.com/react-navigation/react-navigation/releases/tag/2.11.0)
|
||||
### Added
|
||||
- Export some modules that are useful for moving stack navigator outside of core
|
||||
|
||||
## [2.10.0] - [2018-08-02](https://github.com/react-navigation/react-navigation/releases/tag/2.10.0)
|
||||
### Added
|
||||
- `lazy` and `optimizationsEnabled` options to `createMaterialTopTabNavigator` (react-navigation-tabs@0.6.0)
|
||||
|
||||
### Fixed
|
||||
- Android back button in stack with drawer closes drawer properly if open (react-navigation-drawer@0.5.0)
|
||||
- Fixes bug where `null` doesn't work in routerOptions `paths` object for deeplinking ([#4791](https://github.com/react-navigation/react-navigation/pull/4791))
|
||||
|
||||
## [2.9.3] - [2018-07-26](https://github.com/react-navigation/react-navigation/releases/tag/2.9.3)
|
||||
### Added
|
||||
- Add `NavigationTestUtils` which can be imported by path to be used with jest snapshot testing.
|
||||
|
||||
## [2.9.2] - [2018-07-25](https://github.com/react-navigation/react-navigation/releases/tag/2.9.2)
|
||||
### Added
|
||||
- Export `StackViewTransitionConfigs` to allow you to extend default config in custom transition configs. [#4761](https://github.com/react-navigation/react-navigation/pull/4761)
|
||||
|
||||
### Fixed
|
||||
- Error when building with haul: ref to pathToRegexp.compile. [#4658](https://github.com/react-navigation/react-navigation/pull/4658).
|
||||
|
||||
## [2.9.1] - [2018-07-24](https://github.com/react-navigation/react-navigation/releases/tag/2.9.1)
|
||||
### Fixed
|
||||
- Incorrect parameters passed to title offset calculation led to bug in header layout when no right component (https://github.com/react-navigation/react-navigation/issues/4754)
|
||||
|
||||
### Fixed
|
||||
- Typo in Header transition preset check.
|
||||
|
||||
## [2.9.0] - [2018-07-20](https://github.com/react-navigation/react-navigation/releases/tag/2.9.0)
|
||||
### Added
|
||||
- `headerLayoutPreset: 'center' | 'left'` to provide an easy solution for [questions like this](https://github.com/react-navigation/react-navigation/issues/4615).
|
||||
- `headerBackTitleEnabled` - this configuration option for stack navigator allows you to force back button titles to either be rendered or not (if you disagree with defaults for your platform and layout preset).
|
||||
|
||||
### Fixed
|
||||
- Android back button ripple is now appropriately sized (fixes [#3955](https://github.com/react-navigation/react-navigation/issues/3955)).
|
||||
- Respect header background color on container (fixes edge case where user depended on displaying content that was rendered behind the navigator, this particular behavior should not be depended on and may break in the future, but this change is still useful regardless).
|
||||
|
||||
|
||||
## [2.8.0] - [2018-07-19](https://github.com/react-navigation/react-navigation/releases/tag/2.8.0)
|
||||
### Added
|
||||
- `headerLeftContainerStyle`, `headerTitleContainerStyle`, and `headerRightContainerStyle` are exposed on `navigationOptions`. These properties allow you to customize the style of the container of `headerLeft`, `headerTitle` and `headerRight` components.
|
||||
|
||||
### Fixed
|
||||
- Fixed memory leaks in `createNavigator`: [closure scope leak](https://github.com/react-navigation/react-navigation/commit/1a765562905e93bbae0262dd20c2688221c999e8), and [clean up old descriptors](https://github.com/react-navigation/react-navigation/commit/93642e16e7ff029586b68ee732ec790504ee4862).
|
||||
|
||||
## [2.7.0] - [2018-07-17](https://github.com/react-navigation/react-navigation/releases/tag/2.7.0)
|
||||
### Added
|
||||
- The enableURLHandling prop on the top level navigator component allows you to disable deep linking handling. Currently it is always enabled. To disable it, `<RootNavigator enableURLHandling={false} />`
|
||||
|
||||
### Changed
|
||||
- StackNavigator.replace method no longer requires a key param. If the key is left undefined, the last screen in the stack will be replaced.
|
||||
|
||||
### Fixed
|
||||
- Support headerLeft component for the first screen in a stack (#4608).
|
||||
- Removed bottomBorder when `headerTransparent` is set to true.
|
||||
- Improve empty path and param handling in deep linking (#4671). This fixes issues with deep linking and fully tests the differences between path: '' and path: null. Empty string matches empty paths, and null path will let the child router handle paths at the same level. Also it makes sure that params are not duplicated between path and query when they are serialized with getPathAndParamsForState.
|
||||
- Fix onTransitionStart not being invoked when provided in navigator config.(#4100)
|
||||
- Rare case when users navigated back and forth quickly with exactly the right timing would cause a crash due to a scene being queued to transition, then clobbered, then attempted to render as a stale scene but without a descriptor. ([commit](https://github.com/react-navigation/react-navigation/commit/cab4d71a5e09188df3f4a294c98779eecb860a78))
|
||||
|
||||
## [2.6.2] - [2018-07-06](https://github.com/react-navigation/react-navigation/releases/tag/2.6.2)
|
||||
### Changed
|
||||
- Relax vertical padding warnings on header.
|
||||
|
||||
## [2.6.1] - [2018-07-05](https://github.com/react-navigation/react-navigation/releases/tag/2.6.1)
|
||||
### Added
|
||||
- Warn for more invalid headerStyle properties (padding, top/right/bottom/left, position).
|
||||
|
||||
### Fixed
|
||||
- Fixed missing header shadow on Android.
|
||||
|
||||
## [2.6.0] - [2018-07-04](https://github.com/react-navigation/react-navigation/releases/tag/2.6.0)
|
||||
### Added
|
||||
- [NavigationEvents](https://github.com/react-navigation/react-navigation/pull/4188) component as a declarative interface for subscribing to navigation focus events.
|
||||
|
||||
### Fixed
|
||||
- Fix stack router child router delegation priority (https://github.com/react-navigation/react-navigation/commit/e8c1833053e37d28f0ce505ff323565abf23b6a2)
|
||||
- Avoid crash when calling isFocused on old route (https://github.com/react-navigation/react-navigation/commit/0921889f7a3acfc6d6bcc4909d209eeeee985ba7)
|
||||
- Stack router no longer attempts to parse query params within path handling
|
||||
- Switch router now has exact same param treatment for URLs as stack router does
|
||||
|
||||
### Changed
|
||||
- Internally we no longer need to special case PlatformHelpers by platform as react-native-web handles the APIs we mocked out with it now.
|
||||
|
||||
## [2.5.5] - [2018-06-27](https://github.com/react-navigation/react-navigation/releases/tag/2.5.5)
|
||||
### Added
|
||||
- Throw error in development mode when header navigation option is set to a string - a common mistake that would otherwise result in a cryptic error message.
|
||||
- Throw error in development mode when title is not a string.
|
||||
|
||||
### Fixed
|
||||
- Delegate to child routers for more than just the top screen in the stack.
|
||||
- Update react-navigation-drawer to 0.4.3 to fix `initialRouteParams` option
|
||||
|
||||
## [2.5.4] - [2018-06-27](https://github.com/react-navigation/react-navigation/releases/tag/2.5.4)
|
||||
### Fixed
|
||||
- Header no longer sometimes flashes for 1 frame when using `header: null` on initial route of stack with floating header.
|
||||
- Export `createSwitchNavigator` in react-navigation.web.js
|
||||
|
||||
## [2.5.3] - [2018-06-23](https://github.com/react-navigation/react-navigation/releases/tag/2.5.3)
|
||||
### Fixed
|
||||
- `setParams` applies to the navigation object it is called on even if that is the navigation object for a navigation view (more details in https://github.com/react-navigation/react-navigation/issues/4497)
|
||||
|
||||
## [2.5.2] - [2018-06-23](https://github.com/react-navigation/react-navigation/releases/tag/2.5.2)
|
||||
### Fixed
|
||||
- Update react-navigation-drawer to fix regression in toggleDrawer
|
||||
|
||||
## [2.5.1] - [2018-06-22](https://github.com/react-navigation/react-navigation/releases/tag/2.5.1)
|
||||
### Fixed
|
||||
- `transitionConfig` in stack navigator no longer passes incorrect `fromTransitionProps` when navigating back
|
||||
|
||||
## [2.5.0] - [2018-06-22](https://github.com/react-navigation/react-navigation/releases/tag/2.5.0)
|
||||
### Changed
|
||||
- Refactor internals to make it play more nicely with web
|
||||
|
||||
### Fixed
|
||||
- `const defaultGetStateForAction = SwitchBasedNavigator.router.getStateForAction` no longer throws error.
|
||||
- Updated react-navigation-drawer to 0.4.1 which should fix issues related to automatically closing drawer when changing routes.
|
||||
|
||||
## [2.4.1] - [2018-06-21](https://github.com/react-navigation/react-navigation/releases/tag/2.4.1)
|
||||
### Changed
|
||||
- Improved examples
|
||||
|
||||
[Unreleased]: https://github.com/react-navigation/react-navigation/compare/2.17.0...HEAD
|
||||
[2.17.0]: https://github.com/react-navigation/react-navigation/compare/2.16.0...2.17.0
|
||||
[2.16.0]: https://github.com/react-navigation/react-navigation/compare/2.15.0...2.16.0
|
||||
[2.15.0]: https://github.com/react-navigation/react-navigation/compare/2.14.2...2.15.0
|
||||
[2.14.2]: https://github.com/react-navigation/react-navigation/compare/2.14.1...2.14.2
|
||||
[2.14.1]: https://github.com/react-navigation/react-navigation/compare/2.14.0...2.14.1
|
||||
[2.14.0]: https://github.com/react-navigation/react-navigation/compare/2.13.1...2.14.0
|
||||
[2.13.0]: https://github.com/react-navigation/react-navigation/compare/2.12.1...2.13.0
|
||||
[2.12.1]: https://github.com/react-navigation/react-navigation/compare/2.12.0...2.12.1
|
||||
[2.12.0]: https://github.com/react-navigation/react-navigation/compare/2.11.2...2.12.0
|
||||
[2.11.2]: https://github.com/react-navigation/react-navigation/compare/2.11.1...2.11.2
|
||||
[2.11.1]: https://github.com/react-navigation/react-navigation/compare/2.11.0...2.11.1
|
||||
[2.11.0]: https://github.com/react-navigation/react-navigation/compare/2.10.0...2.11.0
|
||||
[2.10.0]: https://github.com/react-navigation/react-navigation/compare/2.9.3...2.10.0
|
||||
[2.9.3]: https://github.com/react-navigation/react-navigation/compare/2.9.2...2.9.3
|
||||
[2.9.2]: https://github.com/react-navigation/react-navigation/compare/2.9.1...2.9.2
|
||||
[2.9.1]: https://github.com/react-navigation/react-navigation/compare/2.9.0...2.9.1
|
||||
[2.9.0]: https://github.com/react-navigation/react-navigation/compare/2.8.0...2.9.0
|
||||
[2.8.0]: https://github.com/react-navigation/react-navigation/compare/2.7.0...2.8.0
|
||||
[2.7.0]: https://github.com/react-navigation/react-navigation/compare/2.6.2...2.7.0
|
||||
[2.6.2]: https://github.com/react-navigation/react-navigation/compare/2.6.1...2.6.2
|
||||
[2.6.1]: https://github.com/react-navigation/react-navigation/compare/2.6.0...2.6.1
|
||||
[2.6.0]: https://github.com/react-navigation/react-navigation/compare/2.5.5...2.6.0
|
||||
[2.5.5]: https://github.com/react-navigation/react-navigation/compare/2.5.4...2.5.5
|
||||
[2.5.4]: https://github.com/react-navigation/react-navigation/compare/2.5.3...2.5.4
|
||||
[2.5.3]: https://github.com/react-navigation/react-navigation/compare/2.5.2...2.5.3
|
||||
[2.5.2]: https://github.com/react-navigation/react-navigation/compare/2.5.1...2.5.2
|
||||
[2.5.1]: https://github.com/react-navigation/react-navigation/compare/2.5.0...2.5.1
|
||||
[2.5.0]: https://github.com/react-navigation/react-navigation/compare/2.4.1...2.5.0
|
||||
[2.4.1]: https://github.com/react-navigation/react-navigation/compare/2.4.0...2.4.1
|
||||
- Fix regression in backgroundColor on cardStyle for stack navigator.
|
||||
|
||||
## [3.0.0] - [2018-11-17](https://github.com/react-navigation/react-navigation/releases/tag/3.0.0)
|
||||
|
||||
- Changes between the latest 2.x release and 3.0.0 are listed on the blog at https://reactnavigation.org/blog/2018/11/17/react-navigation-3.0.html
|
||||
|
||||
# [Previous major versions]
|
||||
|
||||
- [2.x](https://github.com/react-navigation/react-navigation/blob/2.x/CHANGELOG.md)
|
||||
|
||||
[Unreleased]: https://github.com/react-navigation/react-navigation/compare/3.1.4...HEAD
|
||||
[3.1.4]: https://github.com/react-navigation/react-navigation/compare/3.1.3...3.1.4
|
||||
[3.1.3]: https://github.com/react-navigation/react-navigation/compare/3.1.2...3.1.3
|
||||
[3.1.2]: https://github.com/react-navigation/react-navigation/compare/3.0.9...3.1.2
|
||||
[3.0.9]: https://github.com/react-navigation/react-navigation/compare/3.0.8...3.0.9
|
||||
[3.0.8]: https://github.com/react-navigation/react-navigation/compare/3.0.7...3.0.8
|
||||
[3.0.7]: https://github.com/react-navigation/react-navigation/compare/3.0.6...3.0.7
|
||||
[3.0.6]: https://github.com/react-navigation/react-navigation/compare/3.0.5...3.0.6
|
||||
[3.0.5]: https://github.com/react-navigation/react-navigation/compare/3.0.4...3.0.5
|
||||
[3.0.4]: https://github.com/react-navigation/react-navigation/compare/3.0.3...3.0.4
|
||||
[3.0.3]: https://github.com/react-navigation/react-navigation/compare/3.0.2...3.0.3
|
||||
[3.0.2]: https://github.com/react-navigation/react-navigation/compare/3.0.1...3.0.2
|
||||
[3.0.1]: https://github.com/react-navigation/react-navigation/compare/3.0.0...3.0.1
|
||||
[3.0.0]: https://github.com/react-navigation/react-navigation/compare/2.x...3.0.0
|
||||
|
||||
12
README.md
12
README.md
@@ -6,17 +6,7 @@ React Navigation is born from the React Native community's need for an extensibl
|
||||
|
||||
## Installation
|
||||
|
||||
Since the library is a JS-based solution, to install the latest version of react-navigation you only need to run:
|
||||
|
||||
```bash
|
||||
yarn add react-navigation
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```bash
|
||||
npm install --save react-navigation
|
||||
```
|
||||
See: https://reactnavigation.org/docs/en/getting-started.html
|
||||
|
||||
## Documentation
|
||||
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
{
|
||||
"presets": [
|
||||
"babel-preset-expo"
|
||||
],
|
||||
"env": {
|
||||
"development": {
|
||||
"plugins": [
|
||||
"transform-react-jsx-source"
|
||||
],
|
||||
},
|
||||
"production": {
|
||||
"plugins": [
|
||||
"transform-remove-console"
|
||||
]
|
||||
}
|
||||
}
|
||||
"expo"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
# Navigation Playground Example
|
||||
|
||||
A playground for experimenting with react-navigation in a pure-JS React Native app.
|
||||
The NavigationPlayground example app includes a variety of patterns and is used as a simple way for contributors to manually integration test changes.
|
||||
|
||||
## Usage
|
||||
|
||||
Please see the [Contributors Guide](https://reactnavigation.org/docs/contributing.html#run-the-example-app) for instructions on running these example apps.
|
||||
```bash
|
||||
yarn # in the react-navigation root directory
|
||||
cd examples/NavigationPlayground
|
||||
yarn
|
||||
yarn start
|
||||
```
|
||||
|
||||
You can view this example application directly on your phone by visiting [our expo demo](https://exp.host/@react-navigation/NavigationPlayground).
|
||||
You can view this example application directly on Android phones by visiting scanning the QR code on [this site](https://exp.host/@react-navigation/NavigationPlayground) with the [Expo app](https://play.google.com/store/apps/details?id=host.exp.exponent&hl=en).
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"splash": {
|
||||
"image": "./assets/icons/splash.png"
|
||||
},
|
||||
"sdkVersion": "30.0.0",
|
||||
"sdkVersion": "32.0.0",
|
||||
"assetBundlePatterns": [
|
||||
"**/*"
|
||||
],
|
||||
@@ -23,4 +23,4 @@
|
||||
"package": "com.reactnavigation.example"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ class MyHomeScreen extends React.Component {
|
||||
tabBarLabel: 'Home',
|
||||
tabBarIcon: ({ tintColor, focused, horizontal }) => (
|
||||
<Ionicons
|
||||
name={focused ? 'ios-home' : 'ios-home-outline'}
|
||||
name={focused ? 'ios-home' : 'ios-home'}
|
||||
size={horizontal ? 20 : 26}
|
||||
style={{ color: tintColor }}
|
||||
/>
|
||||
@@ -41,7 +41,7 @@ class ReccomendedScreen extends React.Component {
|
||||
tabBarLabel: 'Reccomended',
|
||||
tabBarIcon: ({ tintColor, focused, horizontal }) => (
|
||||
<Ionicons
|
||||
name={focused ? 'ios-people' : 'ios-people-outline'}
|
||||
name={focused ? 'ios-people' : 'ios-people'}
|
||||
size={horizontal ? 20 : 26}
|
||||
style={{ color: tintColor }}
|
||||
/>
|
||||
@@ -67,7 +67,7 @@ class FeaturedScreen extends React.Component {
|
||||
tabBarLabel: 'Featured',
|
||||
tabBarIcon: ({ tintColor, focused, horizontal }) => (
|
||||
<Ionicons
|
||||
name={focused ? 'ios-star' : 'ios-star-outline'}
|
||||
name={focused ? 'ios-star' : 'ios-star'}
|
||||
size={horizontal ? 20 : 26}
|
||||
style={{ color: tintColor }}
|
||||
/>
|
||||
|
||||
@@ -73,7 +73,7 @@ MyHomeScreen.navigationOptions = {
|
||||
tabBarLabel: 'Home',
|
||||
tabBarIcon: ({ tintColor, focused, horizontal }) => (
|
||||
<Ionicons
|
||||
name={focused ? 'ios-home' : 'ios-home-outline'}
|
||||
name={'ios-home'}
|
||||
size={horizontal ? 20 : 26}
|
||||
style={{ color: tintColor }}
|
||||
/>
|
||||
@@ -94,7 +94,7 @@ class MyPeopleScreen extends React.Component<MyPeopleScreenProps> {
|
||||
tabBarLabel: 'People',
|
||||
tabBarIcon: ({ tintColor, focused, horizontal }) => (
|
||||
<Ionicons
|
||||
name={focused ? 'ios-people' : 'ios-people-outline'}
|
||||
name={'ios-people'}
|
||||
size={horizontal ? 20 : 26}
|
||||
style={{ color: tintColor }}
|
||||
/>
|
||||
@@ -134,7 +134,7 @@ class MyChatScreen extends React.Component<MyChatScreenProps> {
|
||||
tabBarLabel: 'Chat',
|
||||
tabBarIcon: ({ tintColor, focused, horizontal }) => (
|
||||
<Ionicons
|
||||
name={focused ? 'ios-chatboxes' : 'ios-chatboxes-outline'}
|
||||
name={'ios-chatboxes'}
|
||||
size={horizontal ? 20 : 26}
|
||||
style={{ color: tintColor }}
|
||||
/>
|
||||
@@ -169,7 +169,7 @@ MySettingsScreen.navigationOptions = {
|
||||
tabBarLabel: 'Settings',
|
||||
tabBarIcon: ({ tintColor, focused, horizontal }) => (
|
||||
<Ionicons
|
||||
name={focused ? 'ios-settings' : 'ios-settings-outline'}
|
||||
name={'ios-settings'}
|
||||
size={horizontal ? 20 : 26}
|
||||
style={{ color: tintColor }}
|
||||
/>
|
||||
|
||||
@@ -109,7 +109,7 @@ const StacksInTabs = createBottomTabNavigator(
|
||||
tabBarLabel: 'Home',
|
||||
tabBarIcon: ({ tintColor, focused }) => (
|
||||
<Ionicons
|
||||
name={focused ? 'ios-home' : 'ios-home-outline'}
|
||||
name={focused ? 'ios-home' : 'ios-home'}
|
||||
size={26}
|
||||
style={{ color: tintColor }}
|
||||
/>
|
||||
@@ -123,7 +123,7 @@ const StacksInTabs = createBottomTabNavigator(
|
||||
tabBarLabel: 'Settings',
|
||||
tabBarIcon: ({ tintColor, focused }) => (
|
||||
<Ionicons
|
||||
name={focused ? 'ios-settings' : 'ios-settings-outline'}
|
||||
name={focused ? 'ios-settings' : 'ios-settings'}
|
||||
size={26}
|
||||
style={{ color: tintColor }}
|
||||
/>
|
||||
|
||||
@@ -66,7 +66,7 @@ const TabNav = createBottomTabNavigator(
|
||||
tabBarLabel: 'Home',
|
||||
tabBarIcon: ({ tintColor, focused }) => (
|
||||
<Ionicons
|
||||
name={focused ? 'ios-home' : 'ios-home-outline'}
|
||||
name={focused ? 'ios-home' : 'ios-home'}
|
||||
size={26}
|
||||
style={{ color: tintColor }}
|
||||
/>
|
||||
@@ -80,7 +80,7 @@ const TabNav = createBottomTabNavigator(
|
||||
title: 'Settings',
|
||||
tabBarIcon: ({ tintColor, focused }) => (
|
||||
<Ionicons
|
||||
name={focused ? 'ios-settings' : 'ios-settings-outline'}
|
||||
name={focused ? 'ios-settings' : 'ios-settings'}
|
||||
size={26}
|
||||
style={{ color: tintColor }}
|
||||
/>
|
||||
|
||||
@@ -105,15 +105,15 @@ const createTabScreen = (name, icon, focusedIcon) => {
|
||||
const TabsWithNavigationEvents = createMaterialBottomTabNavigator(
|
||||
{
|
||||
One: {
|
||||
screen: createTabScreen('One', 'numeric-1-box-outline', 'numeric-1-box'),
|
||||
screen: createTabScreen('One', 'numeric-1-box', 'numeric-1-box'),
|
||||
},
|
||||
Two: {
|
||||
screen: createTabScreen('Two', 'numeric-2-box-outline', 'numeric-2-box'),
|
||||
screen: createTabScreen('Two', 'numeric-2-box', 'numeric-2-box'),
|
||||
},
|
||||
Three: {
|
||||
screen: createTabScreen(
|
||||
'Three',
|
||||
'numeric-3-box-outline',
|
||||
'numeric-3-box',
|
||||
'numeric-3-box'
|
||||
),
|
||||
},
|
||||
|
||||
@@ -81,15 +81,15 @@ const createTabScreen = (name, icon, focusedIcon, tintColor = '#673ab7') => {
|
||||
const TabsWithNavigationFocus = createMaterialBottomTabNavigator(
|
||||
{
|
||||
One: {
|
||||
screen: createTabScreen('One', 'numeric-1-box-outline', 'numeric-1-box'),
|
||||
screen: createTabScreen('One', 'numeric-1-box', 'numeric-1-box'),
|
||||
},
|
||||
Two: {
|
||||
screen: createTabScreen('Two', 'numeric-2-box-outline', 'numeric-2-box'),
|
||||
screen: createTabScreen('Two', 'numeric-2-box', 'numeric-2-box'),
|
||||
},
|
||||
Three: {
|
||||
screen: createTabScreen(
|
||||
'Three',
|
||||
'numeric-3-box-outline',
|
||||
'numeric-3-box',
|
||||
'numeric-3-box'
|
||||
),
|
||||
},
|
||||
|
||||
@@ -4,21 +4,21 @@
|
||||
"private": true,
|
||||
"main": "node_modules/expo/AppEntry.js",
|
||||
"scripts": {
|
||||
"postinstall": "rm -rf node_modules/react-native-screens",
|
||||
"postinstall": "rm -rf node_modules/react-navigation/{.git,node_modules,examples}",
|
||||
"start": "expo start",
|
||||
"android": "expo start --android",
|
||||
"ios": "expo start --ios",
|
||||
"test": "flow"
|
||||
},
|
||||
"dependencies": {
|
||||
"expo": "^30.0.0",
|
||||
"expo": "^32.0.0",
|
||||
"hoist-non-react-statics": "^3.0.1",
|
||||
"invariant": "^2.2.4",
|
||||
"react": "16.3.1",
|
||||
"react-native": "^0.55.0",
|
||||
"react": "16.5.0",
|
||||
"react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",
|
||||
"react-native-iphone-x-helper": "^1.0.2",
|
||||
"react-native-paper": "^2.1.3",
|
||||
"react-navigation": "link:../..",
|
||||
"react-navigation": "../..",
|
||||
"react-navigation-header-buttons": "^0.0.4",
|
||||
"react-navigation-material-bottom-tabs": "1.0.0"
|
||||
},
|
||||
@@ -38,13 +38,6 @@
|
||||
"json",
|
||||
"jsx",
|
||||
"node"
|
||||
],
|
||||
"modulePathIgnorePatterns": [
|
||||
"/node_modules/.*/react-native/",
|
||||
"/node_modules/.*/react/"
|
||||
],
|
||||
"transformIgnorePatterns": [
|
||||
"/node_modules/(?!react-native|react-navigation)/"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
/**
|
||||
* @noflow
|
||||
*/
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const blacklist = require('metro/src/blacklist');
|
||||
|
||||
module.exports = {
|
||||
getBlacklistRE() {
|
||||
return blacklist([
|
||||
/react\-navigation\/examples\/(?!NavigationPlayground).*/,
|
||||
/react\-navigation\/node_modules\/react-native\/(.*)/,
|
||||
/react\-navigation\/node_modules\/react\/(.*)/,
|
||||
/react\-navigation\/node_modules\/react-native-paper\/(.*)/,
|
||||
/react\-navigation\/node_modules\/@expo\/vector-icons\/(.*)/,
|
||||
]);
|
||||
},
|
||||
extraNodeModules: getNodeModulesForDirectory(path.resolve('.')),
|
||||
};
|
||||
|
||||
function getNodeModulesForDirectory(rootPath) {
|
||||
const nodeModulePath = path.join(rootPath, 'node_modules');
|
||||
const folders = fs.readdirSync(nodeModulePath);
|
||||
return folders.reduce((modules, folderName) => {
|
||||
const folderPath = path.join(nodeModulePath, folderName);
|
||||
if (folderName.startsWith('@')) {
|
||||
const scopedModuleFolders = fs.readdirSync(folderPath);
|
||||
const scopedModules = scopedModuleFolders.reduce(
|
||||
(scopedModules, scopedFolderName) => {
|
||||
scopedModules[
|
||||
`${folderName}/${scopedFolderName}`
|
||||
] = maybeResolveSymlink(path.join(folderPath, scopedFolderName));
|
||||
return scopedModules;
|
||||
},
|
||||
{}
|
||||
);
|
||||
return Object.assign({}, modules, scopedModules);
|
||||
}
|
||||
modules[folderName] = maybeResolveSymlink(folderPath);
|
||||
return modules;
|
||||
}, {});
|
||||
}
|
||||
|
||||
function maybeResolveSymlink(maybeSymlinkPath) {
|
||||
if (fs.lstatSync(maybeSymlinkPath).isSymbolicLink()) {
|
||||
const resolved = path.resolve(
|
||||
path.dirname(maybeSymlinkPath),
|
||||
fs.readlinkSync(maybeSymlinkPath)
|
||||
);
|
||||
return resolved;
|
||||
}
|
||||
return maybeSymlinkPath;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +0,0 @@
|
||||
# Examples
|
||||
|
||||
## Usage
|
||||
|
||||
Please see the [Contributors Guide](https://reactnavigation.org/docs/en/contributing.html#run-the-example-app) for instructions.
|
||||
16
flow/react-navigation.js
vendored
16
flow/react-navigation.js
vendored
@@ -678,8 +678,8 @@ declare module 'react-navigation' {
|
||||
// The value that represents the progress of the transition when navigation
|
||||
// state changes from one to another. Its numeric value will range from 0
|
||||
// to 1.
|
||||
// progress.__getAnimatedValue() < 1 : transtion is happening.
|
||||
// progress.__getAnimatedValue() == 1 : transtion completes.
|
||||
// progress.__getAnimatedValue() < 1 : transition is happening.
|
||||
// progress.__getAnimatedValue() == 1 : transition completes.
|
||||
progress: AnimatedValue,
|
||||
|
||||
// All the scenes of the transitioner.
|
||||
@@ -1208,19 +1208,19 @@ declare module 'react-navigation' {
|
||||
};
|
||||
declare export var TabBarBottom: React$ComponentType<_TabBarBottomProps>;
|
||||
|
||||
declare export function withNavigation<Props: {}>(
|
||||
Component: React$ComponentType<Props>
|
||||
declare export function withNavigation<Props: {}, ComponentType: React$ComponentType<Props>>(
|
||||
Component: ComponentType
|
||||
): React$ComponentType<
|
||||
$Diff<
|
||||
Props,
|
||||
React$ElementConfig<ComponentType>,
|
||||
{
|
||||
navigation: NavigationScreenProp<NavigationStateRoute> | void,
|
||||
}
|
||||
>
|
||||
>;
|
||||
declare export function withNavigationFocus<Props: {}>(
|
||||
Component: React$ComponentType<Props>
|
||||
): React$ComponentType<$Diff<Props, { isFocused: boolean | void }>>;
|
||||
declare export function withNavigationFocus<Props: {}, ComponentType: React$ComponentType<Props>>(
|
||||
Component: ComponentType
|
||||
): React$ComponentType<$Diff<React$ElementConfig<ComponentType>, { isFocused: boolean | void }>>;
|
||||
|
||||
declare export function getNavigation<State: NavigationState, Options: {}>(
|
||||
router: NavigationRouter<State, Options>,
|
||||
|
||||
12
package.json
12
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "react-navigation",
|
||||
"version": "3.0.0",
|
||||
"version": "3.1.4",
|
||||
"description": "Routing and navigation for your React Native apps",
|
||||
"main": "src/react-navigation.js",
|
||||
"repository": {
|
||||
@@ -34,11 +34,11 @@
|
||||
"react-native": "*"
|
||||
},
|
||||
"dependencies": {
|
||||
"@react-navigation/core": "^3.0.0",
|
||||
"@react-navigation/native": "^3.0.1",
|
||||
"react-navigation-drawer": "^1.0.1",
|
||||
"react-navigation-stack": "^1.0.1",
|
||||
"react-navigation-tabs": "^1.0.0"
|
||||
"@react-navigation/core": "3.0.3",
|
||||
"@react-navigation/native": "3.1.4",
|
||||
"react-navigation-drawer": "1.1.0",
|
||||
"react-navigation-stack": "1.0.8",
|
||||
"react-navigation-tabs": "1.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-cli": "^6.24.1",
|
||||
|
||||
Reference in New Issue
Block a user