Rescript 12 - #848
Conversation
|
I tested on my project without issue, and it's on production. Do you see something else you want to change or improve? |
… for improved consistency
| }; | ||
|
|
||
| function timing(prim0, prim1) { | ||
| return ReactNative.Animated.timing(prim0, prim1); |
There was a problem hiding this comment.
this seems wrong
but not sure if it was a compiler bug
There was a problem hiding this comment.
Why it's wrong? It look the same in the .bs.js
function timing(prim0, prim1) {
return ReactNative.Animated.timing(prim0, prim1);
}There was a problem hiding this comment.
It is not zero cost, but it could be, if you duplicate the binding definition instead of using let.
There was a problem hiding this comment.
Oh, I see! But it's not really a regression, we've been living with it for years now, so for me it's a non-blocker for this PR.
It's definitely something we could improve as part of a more global Animated refactoring, though!
For now, IMO, the goal should be to move forward with a 0.84 release using Rescript 12.0. We're already a bit late on the release, so we can use a later one for other Rescript updates (12.1, 12.2, 12.3?) or a breaking-change refactor.
| @@ -0,0 +1,7 @@ | |||
|
|
|||
|
|
|||
| import * as NativeElement$ReactNative from "../elements/NativeElement.res.js"; | |||
There was a problem hiding this comment.
this one is also weird as the change in .res is just formatting
There was a problem hiding this comment.
This PR also migrate from commonjs to esmodule
|
This PR has Edit: I tried locally |
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 941e20c646
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| external announceForAccessibility: (string, ~options: announceForAccessibilityOptions=?) => unit = | ||
| "announceForAccessibility" |
There was a problem hiding this comment.
Bind announcement options to the WithOptions method
When a caller supplies ~options, this binding still invokes AccessibilityInfo.announceForAccessibility; React Native exposes the option-aware implementation separately as announceForAccessibilityWithOptions, which this change removes. Consequently, the second argument is ignored and settings such as queue have no effect, so retain a binding to the option-aware method rather than merging these two exports.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Upgrade bindings to ReScript 12 (peer
>=12.0, ESM,.res.js) and clean up APIs along the way.Tooling / platform
@rescript/react0.15esmodule, suffix.res.js, new CLI scriptsJs.*→nullable/null/Int/Float/RegExp)Breaking API cleanups
share,loop,sendIntent, …)@unboxedforVibration,Linking.ExtraValue,Image.SourceImage.Source:Require/URISource/URISources(replacesfrom*); dropgetSize_legacyPackager.requiredisfloat(Metro asset id)Type organization (additive / internal)
Accessibility.props/iosProps/androidProps/viewPropsLayoutmodule (point,size,rectangle,insets) reused inevents/ScrollView/ImageImagecomposesView.viewPropsWithoutChildren+ ios/android image propsPointerEvent+View.pointerEventProps(also Text / Pressable / Image via View)Not in this PR
@obj→ unboxed transforms (bigger follow-up)Animated.event1/event2left as-is (reverted unification)