Skip to content

Commit 1837461

Browse files
authored
Full rewrite for JSX4, records with optional fields + simplicity (#58)
1 parent acbb2ce commit 1837461

25 files changed

+11926
-11470
lines changed

bsconfig.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
{
22
"name": "rescript-react-navigation",
33
"namespace": "react-navigation",
4-
"reason": { "react-jsx": 3 },
4+
"jsx": {
5+
"version": 4,
6+
"mode": "classic"
7+
},
58
"package-specs": {
69
"module": "commonjs",
710
"in-source": true

package-lock.json

+10,741-9,445
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@
4646
"release": "npmpub"
4747
},
4848
"devDependencies": {
49-
"@rescript/react": "^0.10.0",
49+
"@rescript/react": "^0.11.0",
5050
"husky": "^4.0.0",
5151
"lint-staged": "^10.0.0",
5252
"npmpub": "^5.0.0",
5353
"prettier": "^2.0.0",
54-
"rescript": "^9.1.4",
55-
"rescript-react-native": ">=0.64.3"
54+
"rescript": "^10.1.2",
55+
"rescript-react-native": ">=0.70.0"
5656
},
5757
"prettier": {
5858
"trailingComma": "all"

src/BottomTabs.bs.js

+9-33
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,17 @@
11
'use strict';
22

3-
var Core$ReactNavigation = require("./Core.bs.js");
3+
var Interop = require("./Interop");
44
var BottomTabs = require("@react-navigation/bottom-tabs");
55

6-
var BottomTabNavigationProp = Core$ReactNavigation.NavigationScreenProp;
6+
var TabBarBadge = {};
77

8-
function Make(M) {
9-
var M$1 = {};
10-
var include = Core$ReactNavigation.NavigationScreenProp(M$1);
11-
var Navigation = include;
12-
var bottomTabs = BottomTabs.createBottomTabNavigator();
13-
var make = bottomTabs.Screen;
14-
var $$Screen = {
15-
make: make
16-
};
17-
var make$1 = bottomTabs.Screen;
18-
var ScreenWithCallback = {
19-
make: make$1
20-
};
21-
var make$2 = bottomTabs.Navigator;
22-
var $$Navigator = {
23-
make: make$2
24-
};
25-
var make$3 = bottomTabs.Group;
26-
var Group = {
27-
make: make$3
28-
};
29-
return {
30-
Navigation: Navigation,
31-
bottomTabs: bottomTabs,
32-
$$Screen: $$Screen,
33-
ScreenWithCallback: ScreenWithCallback,
34-
$$Navigator: $$Navigator,
35-
Group: Group
36-
};
8+
function Make($star) {
9+
return Interop.adaptNavigatorModule(BottomTabs.createBottomTabNavigator());
3710
}
3811

39-
exports.BottomTabNavigationProp = BottomTabNavigationProp;
12+
var Navigation = {};
13+
14+
exports.TabBarBadge = TabBarBadge;
4015
exports.Make = Make;
41-
/* @react-navigation/bottom-tabs Not a pure module */
16+
exports.Navigation = Navigation;
17+
/* ./Interop Not a pure module */

0 commit comments

Comments
 (0)