Skip to content

0.70.0

Choose a tag to compare

@MoOx MoOx released this 01 Nov 13:26
· 103 commits to main since this release
ce077a3

This release requires ReScript 10.0.0 or later.
It contains various breaking changes.

Breaking Changes

  • _end is now end (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, #boxNone etc 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, fontWeight is now an abstract type. This means that style(~fontWeight=#_600, ()) now becomes style(~fontWeight=FontWeight._600, ()) 44885db by @cknitt
  • @string usage have been removed when possible. This means types that were inlined in bindings are now common. 6495093 by @cknitt
  • Platform.os now use polymorphic variant. if Platform.os === Platform.android becomes if Platform.os === #android. Be careful: if used in a switch, you will lose metro bundler optimisation ! b189fbc & 9964b13 by @cknitt
  • PlatformColor have been rewritten. Lots of deprecation & polymorphic variants changes (eg: for android, instead of #background_dark use #"@android:color/background_dark") 036566e by @MoOx
  • Appearance now returns option<t> instead of Js.Null.t<t> thanks to @nullable 91f0a67 by @cknitt
  • Deprecated Style.pt unit as been removed (use dp instead (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 written ActionSheetIOS.showActionSheetWithOptions({url}, /*...*/). Previous @obj external helpers will be deprecated in the future, and then removed. Note that Style.style() now have a replacement Style.s() that accepts an object with optional keys ! e606a03 by @cknitt
  • Lots of react-native-web@0.17 View props have been added bee39e5 by @MoOx
  • Added Style.empty to avoid Style.arrayOption (so you can write things like Style.array([style1, condition ? style2 : Style.empty])) 762049d by @cknitt