Harry Yu
80da403c61
fix: fixed Tab/SwitchRouter incorrectly switching children on "ba… ( #74 )
2020-01-29 21:32:17 +08:00
Harry Yu
f9defd5afb
fix: avoid error when updateNextStateHistory called with state
2019-12-12 17:08:41 -08:00
Sébastien Lorber
aeb5682693
fix: update navigation prop invariant for v4 ( #84 )
...
Even if RN v4 use core v3, I find this would make this message less confusing for react-navigation v4 users
2020-01-24 15:45:07 +01:00
Harry Yu
531dc30530
fix: don't pop routeKeyHistory when child handles back action ( #75 )
...
## Motivation
When pressing back in a StackNavigator nested inside the SwitchRouter, the screen would get popped, but the routeKeyHistory of the SwitchRouter gets popped even though the SwitchRouter doesn't handle the back action. This results in the next back action skipping the last opened tab.
## Fix
Before popping the `routeKeyHistory` stack, we check that the history actually changed. I also added a test for this
2019-11-18 04:00:10 -08:00
satyajit.happy
b4a6810235
Revert "wip: removed code block that prevents event dispatch ( #73 )"
...
This reverts commit 115bc778e85ec4e128d32d57fd01784c121e4bfc.
Will come to it later when I have more time.
2019-10-24 15:27:58 +02:00
michizhou
f3fdd161e4
wip: removed code block that prevents event dispatch ( #73 )
2019-10-24 08:28:23 -04:00
Ben Salili-James
363c8b5d9f
refactor: add types to action creators/invariant ( #65 )
...
* refactor: add types to `NavigationActions`
* refactor: add types to `invariant`
* refactor: add types to `getNavigationActionCreators`
* Update invariant.ts
2019-09-16 12:21:32 +01:00
Sébastien Lorber
513d5d4d8a
tests: refactor SwitchRouter tests ( #34 )
...
* add test:dev for dev test workflow, which should rather not lint/build and trigger pretest
* refactor tests to use closure based helper instead of class
* refactor SwitchRouter tests with router stateful helpers to improve tests readability
* simplify matcher
* better initialRoute backBehavior test by using a non-default routeName
* minor fix
* Update src/routers/__tests__/routerTestHelper.js
Co-Authored-By: slorber <slorber@users.noreply.github.com >
* Update src/routers/__tests__/routerTestHelper.js
Co-Authored-By: slorber <slorber@users.noreply.github.com >
* Update src/routers/__tests__/routerTestHelper.js
Co-Authored-By: slorber <slorber@users.noreply.github.com >
* revert bad merge stuff
* revert bad merge stuff
* fix tests
2019-09-16 13:18:22 +02:00
satyajit.happy
a6872b900a
fix: don't keep descriptors for routes that have been removed
2019-09-14 15:25:00 +02:00
satyajit.happy
b5b7cb91b2
fix: fix regression updating route object on navigation
2019-09-14 15:18:54 +02:00
Brent Vatne
8d49ee2771
feat: add theme support
2019-08-22 17:46:03 -07:00
Tanner
5b1a8fed60
feat: support string array for uriPrefix ( #66 )
2019-08-19 20:19:12 -06:00
Janic Duplessis
7dc8819280
docs: Add comment to getScreen fix ( #63 )
2019-05-21 18:02:13 -04:00
Janic Duplessis
720f943fcf
fix: getScreen getting called for each route on init ( #62 )
2019-05-21 17:47:50 -04:00
satyajit.happy
6101d7c181
feat: add a JUMP_TO action for switch
...
Add a JUMP_TO action in switch navigator to handle navigation actions explictly instead of the magical NAVIGATE action.
2019-04-20 13:49:49 +02:00
Brent Vatne
c828cb128c
Fix SwitchRouter depending on previous state to be defined when performing navigate
2019-04-16 16:55:06 -07:00
satyajit.happy
85c4ac7608
chore: configure bob
2019-04-17 16:29:20 +02:00
Brent Vatne
443235e719
Fix withNavigationFocus initial event by moving subscriptions to mount
2019-04-02 14:14:20 +02:00
Satyajit Sahoo
9434cfa418
fix: drop custom history logic for isFirstRouteInParent ( #52 )
...
As the naming suggests, this checks if route is the first one in parent. So probably doesn't make sense to check history.
2019-04-10 19:14:05 +02:00
Brent Vatne
3a1f1e0df4
Merge pull request #51 from react-navigation/@satya164/can-go-back
...
feat: add a isFirstRouteInParent method to navigation object
2019-04-10 10:00:35 -07:00
Brent Vatne
47514546cb
Merge pull request #49 from matthargett/remove-react-create-context
...
Remove create-react-context to shrink bundle size impact
2019-03-15 12:10:15 -07:00
Evan Bacon
7769428269
Update Webpack / Babel config
...
* Added module path in package.json
* Marked as having no side-effects
* Disable commonjs on build
2019-03-09 01:17:47 -08:00
Matt Hargett
72fc3bae4f
Remove react-lifecycles-compat to reduce bundle size impact. - Also bump React, React Native, and babel devDependencies
2019-03-01 16:35:26 -08:00
Brent Vatne
daf37aecff
Merge pull request #44 from serhiipalash/master
...
Set default value “null” for “key” property in RESET action
2019-03-08 12:20:28 -08:00
Pontus Abrahamsson
4f79a705e5
fix: remove console.log ( #32 )
2019-02-09 14:56:00 +01:00
Brent Vatne
75c968caae
Merge pull request #31 from slorber/switch-back-behavior
...
handle new SwitchRouter history back behaviors
2019-02-08 17:50:06 -08:00
Brent Vatne
a6dfe5f0b8
Add a proper development workflow
2019-02-04 17:52:19 -08:00
Brent Vatne
f35c3c2513
Merge pull request #30 from bySabi/master
...
prevent onRef callback be called twice on withNavigationFocus Components
2019-01-28 13:20:35 -08:00
Brent Vatne
78d8548f31
Merge pull request #25 from rimzici/master
...
Do not clear navigation child from cache while transitioning
2018-12-02 12:55:33 -08:00
Brent Vatne
ddf7dddd96
Merge pull request #24 from bySabi/master
...
call createReactContext with at explicit non-value
2018-11-30 13:00:25 -08:00
Brent Vatne
9a54742407
Merge pull request #21 from react-navigation/typescript
...
Add back TypeScript support
2018-11-27 02:29:12 +07:00
Brent Vatne
101c1dc4a5
Merge pull request #20 from react-navigation/fixparams
...
Param handling of SwitchRouter with child action
2018-11-17 08:23:19 +07:00
Brent Vatne
130830c19f
Merge pull request #17 from slorber/navigation-events-bug
...
Fix NavigationEvents implementation
2018-11-09 09:44:04 -08:00
Brent Vatne
2375dd7742
Filter out drawer actions from index changing - temporary - https://github.com/react-navigation/rfcs/issues/66
2018-10-30 15:57:33 -07:00
Eric Vicenti
63383a451c
Improve missing navigator prop invariant message
2018-10-31 11:01:04 -07:00
Eric Vicenti
b039101470
Fix broken references to context
2018-10-29 23:10:04 -07:00
Eric Vicenti
baaaf2d962
export react context directly
2018-10-29 23:02:42 -07:00
Eric Vicenti
88597b87fb
Export context directly for hook consumption
2018-10-29 19:56:10 -07:00
Eric Vicenti
a3372561d0
Stack completion action now targets toChildKey
2018-10-29 18:58:33 -07:00
Eric Vicenti
af888dccb3
Better handling of focus/blur events out of order
2018-10-29 18:27:15 -07:00
Eric Vicenti
145100d012
Revert "Merge pull request #8 from horacioh/feature/typescript"
...
This reverts commit 27ed333c6d09734579d7db2ae1f11e15c283dbdf, reversing
changes made to a4da6ffa471fab2412f54569d2f48fe3a5d14b4f.
# Conflicts:
# package.json
2018-10-29 18:33:50 -07:00
Eric Vicenti
17e1fb1874
Merge pull request #9 from jaulz/patch-1
...
fix: avoid stringified "null" and "undefined" values
2018-10-29 13:59:11 -07:00
Brent Vatne
546ae506a8
Merge pull request #8 from horacioh/feature/typescript
...
Fix test --coverage errors related to TS
2018-10-25 13:44:28 -07:00
Brent Vatne
bc11798ef4
Merge pull request #11 from react-navigation/@brent/default-params
...
WIP: Specify default params in the params key in route config
2018-10-23 16:49:23 -07:00
Brent Vatne
9d00c5ced1
Use proper cache object reference and bump version
2018-10-22 19:45:08 -07:00
Brent Vatne
70c69307c4
Add refocus event and fix child navigation caching
2018-10-22 16:57:51 -07:00
Eric Vicenti
e8fb25e9eb
Merge pull request #10 from janicduplessis/react-is
...
Use react-is to check valid components
2018-10-19 12:57:54 -07:00
Eric Vicenti
8ca682a621
Avoid __DEV__ check for web consumers
2018-10-18 18:12:10 -07:00
Eric Vicenti
9e6a23a482
Merge pull request #7 from react-navigation/revert-6-feature/typescript
...
Revert "add typecript to co-exist with js"
2018-10-17 08:35:43 -07:00
Eric Vicenti
e5d9240edf
Merge pull request #6 from horacioh/feature/typescript
...
add typecript to co-exist with js
2018-10-17 08:32:50 -07:00