Skip to content

Commit ec997bd

Browse files
idkjsMoOx
andauthored
Update to reason-react-native 0.62, reason-react 0.9.0, bs-platform 8.0.0 (#4)
* update to rrn62, fix errors * Update README.md * Update package.json * Update package.json Co-authored-by: Max Thirouin <[email protected]>
1 parent 18cea7e commit ec997bd

File tree

5 files changed

+257
-414
lines changed

5 files changed

+257
-414
lines changed

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,17 @@ for valid values.
5555
#### `pickerEvent`
5656

5757
```reason
58-
type pickerEvent =
59-
ReactNative.Event.syntheticEvent({
60-
.
61-
"target": option(int),
62-
"timestamp": int,
58+
module PickerEvent = {
59+
type payload = {
60+
target: option(int),
61+
timestamp: int,
62+
};
63+
64+
include Event.SyntheticEvent({
65+
type _payload = payload;
6366
});
67+
};
68+
type pickerEvent = PickerEvent.t;
6469
```
6570

6671
Note that `target` is undefined on Android.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@
3535
"test": "yarn re:clean-build"
3636
},
3737
"devDependencies": {
38-
"bs-platform": "^5.2.0",
38+
"bs-platform": "^8.0.0",
3939
"husky": "^1.3.0",
4040
"lint-staged": "^10.1.1",
4141
"prettier": "^1.18.0",
42-
"reason-react": "^0.7.0",
43-
"reason-react-native": "^0.60.0"
42+
"reason-react": "^0.9.0",
43+
"reason-react-native": "^0.62.0"
4444
},
4545
"prettier": {
4646
"trailingComma": "all",
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
'use strict';
22

3-
var NativeElement$ReactNative = require("@reason-react-native/react-native/src/elements/NativeElement.bs.js");
3+
var Event$ReactNative = require("reason-react-native/src/apis/Event.bs.js");
4+
var NativeElement$ReactNative = require("reason-react-native/src/elements/NativeElement.bs.js");
45

6+
Event$ReactNative.SyntheticEvent({});
57

6-
/* NativeElement-ReactNative Not a pure module */
8+
var PickerEvent = {};
9+
10+
exports.PickerEvent = PickerEvent;
11+
/* Not a pure module */

src/ReactNativeDateTimePicker.re

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
include ReactNative.NativeElement;
2-
2+
open ReactNative;
33
// For localeId refer to
44
// https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPInternational/LanguageandLocaleIDs/LanguageandLocaleIDs.html
55
type locale = string;
6+
module PickerEvent = {
7+
type payload = {
8+
target: option(int),
9+
timestamp: int,
10+
};
611

7-
type pickerEvent =
8-
ReactNative.Event.syntheticEvent({
9-
.
10-
"target": option(int),
11-
"timestamp": int,
12+
include Event.SyntheticEvent({
13+
type _payload = payload;
1214
});
15+
};
16+
type pickerEvent = PickerEvent.t;
1317

1418
[@react.component] [@bs.module "@react-native-community/datetimepicker"]
1519
external make:
@@ -66,7 +70,7 @@ external make:
6670
| `imagebutton
6771
]
6872
=?,
69-
~accessibilityStates: array(ReactNative.AccessibilityState.t)=?,
73+
~accessibilityStates: array(ReactNative.Accessibility.state)=?,
7074
~accessibilityTraits: array(ReactNative.AccessibilityTrait.t)=?,
7175
~accessibilityViewIsModal: bool=?,
7276
~accessible: bool=?,

0 commit comments

Comments
 (0)