0.70.0
This release requires ReScript 10.0.0 or later.
It contains various breaking changes.
Breaking Changes
_endis nowend(not a reserved word anymore) 92e3c6f by @cknitt- Camel cased polymorphic variants &
_prefixed props when possible have been changed to reflect React Native original naming convention. Things like#plainText,#boxNoneetc have been changed to what they should be (#"plain-text",#"box-none"etc) 6495093 & 6495093 by @cknitt & 4360933 by @MoOx - Because a limitation with ReScript that doesn't handle correctly numeric string as polymorphic variant,
fontWeightis now an abstract type. This means thatstyle(~fontWeight=#_600, ())now becomesstyle(~fontWeight=FontWeight._600, ())44885db by @cknitt @stringusage have been removed when possible. This means types that were inlined in bindings are now common. 6495093 by @cknittPlatform.osnow use polymorphic variant.if Platform.os === Platform.androidbecomesif Platform.os === #android. Be careful: if used in a switch, you will lose metro bundler optimisation ! b189fbc & 9964b13 by @cknittPlatformColorhave been rewritten. Lots of deprecation & polymorphic variants changes (eg: for android, instead of#background_darkuse#"@android:color/background_dark") 036566e by @MoOxAppearancenow returnsoption<t>instead ofJs.Null.t<t>thanks to@nullable91f0a67 by @cknitt- Deprecated
Style.ptunit as been removed (usedpinstead (density pixel)) 3df0fcf by @cknitt
Others changes
- Most object types created using externals can now be created using objects with optional fields. This means that things like
ActionSheetIOS.showActionSheetWithOptions(ActionSheetIOS.shareOptions(~url,(), /*...*/)can be writtenActionSheetIOS.showActionSheetWithOptions({url}, /*...*/). Previous@objexternal helpers will be deprecated in the future, and then removed. Note thatStyle.style()now have a replacementStyle.s()that accepts an object with optional keys ! e606a03 by @cknitt - Lots of
react-native-web@0.17View props have been added bee39e5 by @MoOx - Added
Style.emptyto avoidStyle.arrayOption(so you can write things likeStyle.array([style1, condition ? style2 : Style.empty])) 762049d by @cknitt