-
Notifications
You must be signed in to change notification settings - Fork 42
Version 0.11.0-rc.2 #72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@mattdamon108 how about another round of testing, with compiler and rescript-react both rc.2 |
Sure, I'll run tests and share the result. 1) v3 backward compatibility 2) v4 classic & automatic. |
Great, then we can ask again on the forum, with simplified instructions now that everything is published to npm. |
deps
V3
I've tested on the current production project, it builds successfully without any code change. V4 classic & automatic
Everything seems fine, except for the below breakings in the case of a component key. let key = Some("k")
let _ = <C ?key /> // option<string> vs. string |
Side comment: there would be dependencies that are not supported in v4, it would break it. |
Why should the type of 'key' change? |
https://github.com/rescript-lang/rescript-react/blob/master/src/React.res#L17:L21 let _ = <C key=Some("k") /> |
Isn't key a special case in the ppx already? By treating it as a special prop it should be possible to make it type string. |
%%private(
@inline
let addKeyProp = (p: 'props, ~k: option<string>=?): 'props =>
switch k {
| Some(k) =>
Obj.magic(Js.Obj.assign(Obj.magic(p), {"key": k}))
| None => p
}
) How about this? |
If it removes the breaking change, it sounds good. |
Yes, it was possible. |
It works well. I'll make a PR. |
No description provided.