hybrid-navigation 2.17.6 → 2.17.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,6 +16,7 @@ interface InterceptParams {
16
16
  sceneId: string;
17
17
  from?: number | string;
18
18
  to?: number | string;
19
+ props?: object;
19
20
  }
20
21
  export type NavigationInterceptor = (action: string, params: InterceptParams) => boolean | Promise<boolean>;
21
22
  export default class DispatchCommandHandler {
@@ -2,11 +2,12 @@ import NavigationModule from '../NavigationModule';
2
2
  export default class DispatchCommandHandler {
3
3
  interceptor = () => false;
4
4
  async dispatch(sceneId, action, params) {
5
- const { from, to } = params;
5
+ const { from, to, props } = params;
6
6
  const intercepted = await this.intercept(action, {
7
7
  sceneId,
8
8
  from,
9
9
  to,
10
+ props,
10
11
  });
11
12
  if (intercepted) {
12
13
  return false;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hybrid-navigation",
3
3
  "description": "React Native Navigation that supports seamless navigation between Native and React.",
4
- "version": "2.17.6",
4
+ "version": "2.17.7",
5
5
  "main": "./lib/index.js",
6
6
  "typings": "./lib/index.d.ts",
7
7
  "react-native": "src/index",
@@ -19,6 +19,7 @@ interface InterceptParams {
19
19
  sceneId: string
20
20
  from?: number | string
21
21
  to?: number | string
22
+ props?: object
22
23
  }
23
24
 
24
25
  export type NavigationInterceptor = (
@@ -30,11 +31,12 @@ export default class DispatchCommandHandler {
30
31
  private interceptor: NavigationInterceptor = () => false
31
32
 
32
33
  async dispatch(sceneId: string, action: string, params: DispatchParams): Promise<boolean> {
33
- const { from, to } = params
34
+ const { from, to, props } = params
34
35
  const intercepted = await this.intercept(action, {
35
36
  sceneId,
36
37
  from,
37
38
  to,
39
+ props,
38
40
  })
39
41
 
40
42
  if (intercepted) {