Skip to content

0.11.0

Compare
Choose a tag to compare
@necolas necolas released this 13 Mar 01:15
· 633 commits to master since this release

This release includes: a refactor of StyleSheet internals to improve browser layout times; improved compatibility with React Native; reduced bundle sizes in worse-case-scenario; and improved text truncation capabilities in supporting browsers.

Breaking changes

  • CSS output has changed to better optimize browser layout times (9f860b8 and d4417e9)
  • Remove export default from the ESM entry point, to help with tree-shaking (69bd0f6)
  • Remove ART from the exports to reduce CJS bundle size (3d3ea9a)
  • Remove resizeMode static from Image (49edcb2)
  • Replace outline with outline{Color,Style,Width} styles (f048d84)
  • Replace animationName with animationKeyframes style prop.

Deprecations

  • The className prop on View and Text is deprecated and will be removed shortly (d50f630)

New features

  • Add TextInput support for onContentSizeChange, by @awinograd (67979b7)
  • Add Text support for numberOfLines prop value greater than 1. Only supported in WebKit and Blink browsers; limited localization support (f048d84)

Fixes

  • Organize unimplemented modules in directories to help reduce CJS build size, by @EvanBacon (2a418be)
  • Fix the NativeEventEmitter implementation, by @EvanBacon (9ce2b5b)
  • Allow text shadow to be set if only a textShadowBlur and textShadowColor are provided, by @skahack (cf7b020)
  • Fix animation style prop types.
  • Fix use of maxWidth with Text using numberOfLines prop.
  • Passing null values for style props now produces improved compatibility with React Native rendering.

Appendix

  • StyleSheet refactor reduces browser layout times up to 30% in the stress tests.
  • StyleSheet refactor reduces HTML payload size for SRR, e.g., the size of the HTML produced by the Twitter PWA's home timeline screen is reduced from 25.56 KB to 21.35 KB (-16%) gzipped.