0.11.0
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 fromImage
(49edcb2) - Replace
outline
withoutline{Color,Style,Width}
styles (f048d84) - Replace
animationName
withanimationKeyframes
style prop.
Deprecations
- The
className
prop onView
andText
is deprecated and will be removed shortly (d50f630)
New features
- Add
TextInput
support foronContentSizeChange
, by @awinograd (67979b7) - Add
Text
support fornumberOfLines
prop value greater than1
. 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
andtextShadowColor
are provided, by @skahack (cf7b020) - Fix animation style prop types.
- Fix use of
maxWidth
withText
usingnumberOfLines
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.