Satyajit Sahoo
e90171bb45
chore: release 4.1.1
2020-02-04 23:31:48 +01:00
Satyajit Sahoo
8c7716f504
fix: make sure index.js is common js
2020-02-04 23:31:11 +01:00
Satyajit Sahoo
27fef7a185
fix: don't use declare module for type definitions
2020-02-04 23:18:28 +01:00
Satyajit Sahoo
ea26056ed2
chore: update LICENSE
2020-02-01 02:06:03 +01:00
Satyajit Sahoo
8b307e2c26
chore: fix node version in CI
2020-01-29 17:43:44 +01:00
Satyajit Sahoo
f22b0d09c3
chore: release 4.1.0
2020-01-29 14:54:27 +01:00
Satyajit Sahoo
838abb757f
chore: update dependencies
2020-01-29 14:52:14 +01:00
William Candillon
5d3fd5bea0
feat: make ScreenProps parametrizable in TypeScript ( #6496 )
...
This change allows for the following to be written:
```tsx
const TreatmentPlanDrawerItem = createStackNavigator(
{
Screen: {
screen: Screen,
// t is of type i18next.TFunction via the type casting below.
navigationOptions: ({ screenProps }) => ({
title: screenProps.t('title'),
})
},
} as NavigationRouteConfigMap<
NavigationStackOptions,
NavigationStackProp<NavigationRoute, any>,
{ t: i18next.TFunction }
>
);
```
2020-01-23 15:41:22 +01:00
Mattia Asti
0189ff4eb3
fix: wrong type in react-navigation.d.ts ( #6486 )
...
This code is actually throwing a type error because of a wrong type declaration with the action expecting to be only a `NavigationNavigateAction` while in reality any action can be dispatched not only the `navigate`.
```jsx
StackActions.replace({
routeName: 'MyRoute1',
// this action is throwing a type error
action: StackActions.push({
routeName: 'MyRoute2',
}),
}),
```
2020-01-23 14:40:08 +00:00
alburkerk
1c30ac07e4
feat: allow navigation params to be typed in navigate method ( #6444 )
...
Motivation
We can type navigation params in component by writing something like this in component props declaration :
export interface SomeNavigationParams {
foo: string;
bar: number;
}
export interface Props {
navigation: NavigationScreenProp<any, SomeNavigationParams>;
}
But when we are navigating to this screen, we only call navigate method without any type checking.
// Next line doesn't trigger ts error
this.props.navigation.navigate('MyRouteName', { foo: "foo", bar: "bar"})
By making navigate a generic method, we can type those params correctly
import { SomeNavigationParams } from '@Screens/....../SomeScreen.types.ts'
......
// Next line triggers an error
this.props.navigation.navigate<SomeNavigationParams>('MyRouteName', { foo: "foo", bar: "bar"});
......
Test plan
No .js code so it's can't be breaking anything. Plus, can't also break typing as changes are seamless for react-navigation API.
2020-01-23 12:19:32 +01:00
Frieder Bluemle
8438221632
Fix typos ( #6579 )
2020-01-23 03:16:52 -08:00
Satyajit Sahoo
653a119b91
chore: update issue template
2020-01-11 16:28:07 +01:00
Satyajit Sahoo
960ce843ae
fix: remove drawer methods from navigation prop
2020-01-04 15:41:46 +01:00
Satyajit Sahoo
f21c7004fa
chore: upgrade depenendecies
2020-01-04 15:40:30 +01:00
imgbot[bot]
87f2ba0464
chore: optimize images ( #6544 )
...
*Total -- 138.77kb -> 80.11kb (42.27%)
/example/src/assets/splash.png -- 133.30kb -> 75.22kb (43.57%)
/example/src/assets/dog-back.png -- 4.55kb -> 3.98kb (12.57%)
/example/src/assets/back.png -- 0.92kb -> 0.91kb (0.96%)
Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com >
Co-authored-by: Imgbot <help@imgbot.net >
2020-01-03 11:37:07 +01:00
Satyajit Sahoo
7e25d0fe96
chore: close stale issues automatically
2019-11-18 02:08:33 +01:00
KUBO
7219cac9f4
fix: remove params in NavigationJumpToAction ( #6360 )
...
* fix: remove params in NavigationJumpToAction
* Update react-navigation.d.ts
2019-10-16 23:12:33 +09:00
KUBO
d760da796d
fix: make params required in NavigationSetParamsActionPayload ( #6343 )
2019-09-30 06:36:15 +09:00
Brent Vatne
541ad54b7e
chore: release 4.0.10
2019-09-25 17:54:13 -07:00
Brent Vatne
0f42057c8e
fix: update link to docs page from deprecation messages
2019-09-25 17:47:20 -07:00
Ashoat Tevosyan
447413128b
[flow] Remove Flow libdef from repo ( #6327 )
2019-09-25 20:45:49 -04:00
satyajit.happy
a28be3b502
chore: release 4.0.9
2019-09-24 13:23:53 +02:00
satyajit.happy
f58c06f192
fix: fix types for switch navigator. fixes #6324
2019-09-24 13:16:11 +02:00
satyajit.happy
8f2a0aa240
chore: release 4.0.8
2019-09-23 22:35:38 +02:00
satyajit.happy
eaebe5d46d
fix: add type aliases for switch navigator. fixes #6324
2019-09-23 22:34:14 +02:00
satyajit.happy
433a4cab5a
chore: release 4.0.7
2019-09-22 00:30:34 +02:00
satyajit.happy
cb4c6994bb
fix: accept type parameter for screenProps
2019-09-22 00:29:42 +02:00
satyajit.happy
2494fb4493
chore: release 4.0.6
2019-09-19 16:49:24 +02:00
satyajit.happy
c75e02af99
fix: fix typings for switch navigator. fixes #6310
2019-09-19 16:46:28 +02:00
satyajit.happy
51cf75f970
refactor: don't use export * to reexport deprecations
2019-09-19 16:30:32 +02:00
Nicholas Lee
20411adf8c
fix: fix the type of NavigationJumpToActionPayload ( #6210 )
...
As mentioned in https://reactnavigation.org/docs/en/switch-actions.html
the param which's name is 'key' of `SwitchActions.jumpTo()` should be optional
2019-09-16 20:07:43 +09:00
Jeremy
838bcc08ca
docs: add the readme back into example ( #6284 )
2019-09-16 23:01:55 +12:00
satyajit.happy
68d89545f3
chore: release 4.0.5
2019-09-14 15:58:08 +02:00
satyajit.happy
42fba673ae
fix: update react-navigation/core
2019-09-14 15:56:09 +02:00
satyajit.happy
61a2eb49ff
chore: use proper types for stack in example
2019-09-12 16:31:48 +02:00
satyajit.happy
aa1f8f449f
chore: release 4.0.4
2019-09-12 16:15:20 +02:00
satyajit.happy
1ca7abe7c1
fix: improve type definitions
2019-09-12 16:14:48 +02:00
satyajit.happy
e2f53a24fd
chore: release 4.0.3
2019-09-11 16:48:36 +02:00
satyajit.happy
b2367880cd
fix: fix type definitions
2019-09-11 16:48:05 +02:00
satyajit.happy
ab086432f0
chore: release 4.0.2
2019-09-09 23:02:06 +02:00
satyajit.happy
bb9f26ecdf
fix: fix typo in definitions
2019-09-09 23:01:45 +02:00
satyajit.happy
eebfeadf3e
chore: release 4.0.1
2019-09-09 16:27:01 +02:00
satyajit.happy
d3bb3833b4
chore: fix missing import in example
2019-09-09 16:23:57 +02:00
satyajit.happy
d8f1d16599
fix: update typescript definitions. closes #6276
2019-09-09 16:20:49 +02:00
Taylor Kline
5bdf25360b
docs: add Changelog information to README ( #6264 )
...
Now that there is no longer a `CHANGELOG.md` file, this should address concerns of users who come to the Github repository looking for release notes.
2019-09-07 09:06:39 -05:00
Brent Vatne
4edc49f25a
fix: status bars in example
2019-09-03 16:24:26 -07:00
jamsch
f0881e3768
fix(deprecations) typo in package name ( #6245 )
2019-09-03 06:11:42 +12:00
satyajit.happy
8373652f7d
docs: fix license in README
2019-09-01 23:59:58 +02:00
satyajit.happy
64e740d2ae
docs: remove changelog file
2019-09-01 23:13:51 +02:00
satyajit.happy
dc7b9c2200
chore: release 4.0.0
2019-08-31 12:34:00 +02:00