11'use strict' ;
22
3- var React = require ( "react" ) ;
43var Js_dict = require ( "rescript/lib/js/js_dict.js" ) ;
54var Caml_option = require ( "rescript/lib/js/caml_option.js" ) ;
65var ReactNative = require ( "react-native" ) ;
6+ var JsxRuntime = require ( "react/jsx-runtime" ) ;
77var Stack$ReactNavigation = require ( "./Stack.bs.js" ) ;
88var Native = require ( "@react-navigation/native" ) ;
99
1010function Example$HomeScreen ( props ) {
11- return React . createElement ( ReactNative . Text , {
11+ return JsxRuntime . jsx ( ReactNative . Text , {
1212 children : "Hello Reasonable Person!"
1313 } ) ;
1414}
@@ -18,7 +18,7 @@ var HomeScreen = {
1818} ;
1919
2020function Example$ModalScreen ( props ) {
21- return React . createElement ( ReactNative . Text , {
21+ return JsxRuntime . jsx ( ReactNative . Text , {
2222 children : "Hello From Modal"
2323 } ) ;
2424}
@@ -34,15 +34,15 @@ var $$Navigator = include.$$Navigator;
3434var $$Screen = include . $$Screen ;
3535
3636function Example$MainStackScreen ( props ) {
37- return React . createElement ( $$Navigator . make , {
38- children : Caml_option . some ( React . createElement ( $$Screen . make , {
37+ return JsxRuntime . jsx ( $$Navigator . make , {
38+ children : Caml_option . some ( JsxRuntime . jsx ( $$Screen . make , {
3939 name : "Home" ,
4040 options : ( function ( props ) {
4141 var params = props . route . params ;
4242 return {
4343 title : params !== undefined ? Caml_option . valFromOption ( params ) . name : "Reason" ,
4444 headerRight : ( function ( param ) {
45- return React . createElement ( ReactNative . Button , {
45+ return JsxRuntime . jsx ( ReactNative . Button , {
4646 color : "#f00" ,
4747 onPress : ( function ( param ) {
4848 props . navigation . navigate ( "MyModal" ) ;
@@ -113,27 +113,30 @@ var linking = {
113113} ;
114114
115115function Example$RootStackScreen ( props ) {
116- return React . createElement ( Native . NavigationContainer , {
116+ return JsxRuntime . jsx ( Native . NavigationContainer , {
117117 linking : linking ,
118- children : React . createElement ( $$Navigator$1 . make , {
118+ children : JsxRuntime . jsxs ( $$Navigator$1 . make , {
119119 screenOptions : ( function ( param ) {
120120 return {
121121 presentation : "modal"
122122 } ;
123123 } ) ,
124- children : Caml_option . some ( null )
125- } , React . createElement ( $$Screen$1 . make , {
126- name : "Main" ,
127- component : Example$MainStackScreen
128- } ) , React . createElement ( $$Screen$1 . make , {
129- name : "MyModal" ,
130- children : ( function ( param ) {
131- return React . createElement ( Example$ModalScreen , {
132- navigation : param . navigation ,
133- route : param . route
134- } ) ;
124+ children : [
125+ JsxRuntime . jsx ( $$Screen$1 . make , {
126+ name : "Main" ,
127+ component : Example$MainStackScreen
128+ } ) ,
129+ JsxRuntime . jsx ( $$Screen$1 . make , {
130+ name : "MyModal" ,
131+ children : ( function ( param ) {
132+ return JsxRuntime . jsx ( Example$ModalScreen , {
133+ navigation : param . navigation ,
134+ route : param . route
135+ } ) ;
136+ } )
135137 } )
136- } ) )
138+ ]
139+ } )
137140 } ) ;
138141}
139142
0 commit comments