diff --git a/src/BottomTabs.re b/src/BottomTabs.re index d2ef0d66..876367d4 100644 --- a/src/BottomTabs.re +++ b/src/BottomTabs.re @@ -156,7 +156,11 @@ module Make = (M: {type params;}) => { ~name: string, ~options: optionsCallback=?, ~initialParams: M.params=?, - ~component: React.component({. "navigation": navigation}), + ~component: React.component({ + . + "navigation": navigation, + "route": route(M.params), + }), unit ) => screenProps = diff --git a/src/Drawer.re b/src/Drawer.re index f48499a0..75c091f7 100644 --- a/src/Drawer.re +++ b/src/Drawer.re @@ -109,7 +109,11 @@ module Make = (M: {type params;}) => { ~name: string, ~options: optionsCallback=?, ~initialParams: M.params=?, - ~component: React.component({. "navigation": navigation}), + ~component: React.component({ + . + "navigation": navigation, + "route": route(M.params), + }), unit ) => screenProps = diff --git a/src/Example.bs.js b/src/Example.bs.js index dfc41b9c..5abd0ec1 100644 --- a/src/Example.bs.js +++ b/src/Example.bs.js @@ -90,7 +90,7 @@ var $$Screen$1 = include$1.Screen; var $$Navigator$1 = include$1.Navigator; function Example$RootStackScreen(Props) { - return React.createElement(Native.NavigationNativeContainer, { + return React.createElement(Native.NavigationContainer, { children: React.createElement($$Navigator$1.make, { mode: "modal", headerMode: "none", diff --git a/src/Example.re b/src/Example.re index a068c6fa..e6ec35ef 100644 --- a/src/Example.re +++ b/src/Example.re @@ -53,10 +53,10 @@ module RootStackScreen = { }); [@react.component] let make = () => - + - ; + ; }; diff --git a/src/Native.bs.js b/src/Native.bs.js index e3dc5a47..4219e579 100644 --- a/src/Native.bs.js +++ b/src/Native.bs.js @@ -1,7 +1,7 @@ 'use strict'; -var NavigationNativeContainer = { }; +var NavigationContainer = { }; -exports.NavigationNativeContainer = NavigationNativeContainer; +exports.NavigationContainer = NavigationContainer; /* No side effect */ diff --git a/src/Native.re b/src/Native.re index 989c505a..9bff3db2 100644 --- a/src/Native.re +++ b/src/Native.re @@ -92,7 +92,7 @@ ``` */ -module NavigationNativeContainer = { +module NavigationContainer = { type state = Js.Json.t; type navigationState = state => unit; @@ -104,7 +104,7 @@ module NavigationNativeContainer = { ~children: React.element ) => React.element = - "NavigationNativeContainer"; + "NavigationContainer"; }; [@bs.module "@react-navigation/native"]