Releases: necolas/react-native-web
0.9.0
0.8.0
This release provides compatibility with the vast majority of React Native v0.55.
Breaking changes
- Use of the responder events on a link element will now prevent the browser's default click behavior #970. (c336995)
- The props passed to ReactDOM are now whitelisted #898. (e0f010d)
- A jest preset is included in the
react-native-web
package and should be used in place of the previous snapshot serializer. (8f0c39c) StyleSheet.hairlineWidth
is now always1
due to browser rounding errors. (3f8624e)Image
is no longer draggable by default. (0eae7be)Image
decoding is async when possible, no longer usesrequestIdleCallback
internally #764. (b8f54f6)Linking
API updates the application document's URL and supports deep-links. (0ee3310)- Export basic stubs for platform-specific modules that may be imported (but not rendered / called) in files running on web. (cf43ffd)
New features
Image
supportsblurRadius
andtintColor
, as well as correctly applying shadows to image pixels. (3153cd8)Text
support fortextDecoration{Color,Style}
styles. (f62ed22)Share
support (using WebShare API.) (10407f3)SwipeableFlatList
support. (b299eb6)SwipeableListView
support. (b299eb6)SectionList
support. (377f23f)FlatList
support. (fc0b814)ScrollView
supportsstickyHeaderIndices
#434. (bb66639)DeviceInfo
basic support. (206a236)LayoutAnimation
basic support. (cb545b0)NativeEventEmitter
support. (ea744fe)Alert
API stub. (19b356a).Animated
update. (f254c8e)ListView
update. (5fcb36f)babel-plugin-react-native-web
can be configured to rewrite paths to either the CommonJS or ESModule exports #961. (026a92f)
Fixes
- Shadow style props are resolved as per React Native. (a40521f and da38e87)
Clipboard
preserves line breaks in original source #979. (14f7dfd)Image
implementsresizeMode=center|repeat
as per React Native. (9fb818c)NativeModules
includesUIManager
property. (bfaca05)UIManager
measurement tasks don't block the main thread. (b4e3427)Image
layout in Firefox. (a82cfbe)Image
loading callbacks are correctly called when rendering an image assumed to be in the browser cache. (d5c6b98)Image
doesn't throw error when loading an empty string source #962. (16b2fb9)- Add
target
property toonLayout
event object. (0816c40) TextInput
allowsnumbers-and-punctuation
keyboardType. (2756ab4)InteractionManager
basic support improvements. (f684a36)ScrollView
is scrollable when horizontal and combined withRefreshControl
. (c003604)AppState
doesn't throw an error formemoryWarning
event. (4bc16fa)Vibration
includes a default pattern. (2237777)ImageBackground
now works with<Text>
children. (6a22528)processColor
is now compatible with React Native. (ff5a928)- All CommonJS exports in the package can be imported without adding
.default
to the require statement. (61bf7e7) - Fix issues related to webpack bundling of modules mixing
import
andmodule.exports
. (e317062)
0.7.0
Breaking changes
- ES modules are now exported and the package is labelled
sideEffect:false
. Babel plugin is legacy. (c4864f5) - Fixes and potential breaking changes to the Responder system. The
ResponderEventPlugin
now rejects browser emulated mouse events that occur after touch events. This fixes several issues, but it's possible that you may have depended on the previously incorrect behaviour #835 #888 #932. (edc99e7) - Remove erroneous
NetInfo.isConnected.getConnectionInfo()
API. (8b1e6f8)
New features
- Support for CSP policy requiring
nonce
on<style>
. (ee5e800) - Mark focusable DOM nodes with 'data-focusable' for integration with TV focus libraries #827. (e8f2c98)
Fixes
0.6.0
Improvements to layout when ResizeObserver
is available, and improved consistency with React Native behaviors.
Breaking changes
AppRegistry
container is no longer absolutely positioned. (a9cacb2)- The
onLayout
prop is now called when elements resize (ifResizeObserver
is supported in the rendering environment). (5a04d07) - Layout measurements are now performed synchronously in the current frame. (a67bf0f)
react-art
must now be installed as peer dependency. (ce89b7e)
New features
AppRegistry
now allows you to define a render callback (web-only feature). (7a3a9a5)AppRegistry
includes provider methods from React Native:setComponentProviderInstrumentationHook
andsetWrapperComponentProvider
. (b96dd66)- Experiment support for
VirtualizedList
from React Native. (9427eea)
Fixes
Text
press event no longer propagates. (1a225bc)createElement
no longer overrides a provided function component. (cf26126)- Fix the consistency of
nativeEvent.location{X,Y}
values between touch and mouse events. (2050730) SafeAreaView
now includes inset padding for Safari iOS. (4c59343)Picker.Item
supports thecolor
prop but whether it is applied depends on browser support. (1aec803)- Fix the reliability of font styles resolution. (23fa663)
0.5.0
New features for styling LTR/RTL applications. Improvements to mouse support in the Responder Event system. Relicensed under the MIT license to match the relicensing of React Native.
Breaking changes
- Potentially breaking change for web-only apps depending on bugs in the Responder Event System that have been fixed in this release. The
ResponderEventPlugin
no longer extracts anymouse{move,up}
events unless a press is active, and no longer extracts any events triggered by the middle/wheel/right button. (9ee89bc)
New features
StyleSheet
supports new style properties and values that automatically account for the writing direction (as introduced in React Native 0.51.0), e.g.,margin{End,Start}
andtextAlign: "end" | "start"
. (b754776)I18nManager
supportsdoLeftAndRightSwapInRTL
andswapLeftAndRightInRTL(swap: boolean)
to query and control the BiDi-flipping of left/right properties and values. For example, you may choose to useend
to position elements relative to the writing direction, and then disable left/right swapping in RTL so thatleft
will always be left. (92794cd)TextInput
now includes arrow keys inonKeyPress
#791. (73b459e)
Fixes
- Account for scroll offsets in
measure
andmeasureInWindow
instance methods #702. (399f465) Touchable
press events are not triggered on right-click #719. (9ee89bc)PanResponder
only firesmouse{move,up}
events when a press is active #701. (9ee89bc)onResponderGrant
is not fired twice on touch devices #802. (893963a)Image
support for base64 SVG data. (31db333)Image
updates tosource
are correctly rendered if the initialsource
value wasundefined
#811. (748b2d0)TextInput
has correct default font styles. (b28cbbb)Text
supportsfontVariant
style #824. (6d90818)StyleSheet
acceptsspace-evenly
value forjustifyContent
. (7265736)- Style flex properties can be set with
setNativeProps
. (00c9dc4) - New development warning for bad style values that include
!important
. (9fe089c) babel-plugin-react-native-web
only rewrites import paths for known exports #822. (a53372c)
0.4.0
New StyleSheet
features and SSR improvements
Breaking changes
StyleSheet.create()
no longer eagerly resolves and injects styles at boot-time. (2ad710d)- Server-side rendering no longer accumulates styles across requests. (240cf7e)
- The return type of
AppRegistry.getApplication()
has changed. (240cf7e) StyleSheet.getStyleSheets()
has been removed; useAppRegistry.getApplication()
.
New features
- Add support for
TextInput
propplaceholderTextColor
. (31d428a) - Add support for defining CSS keyframes in
animationName
style. (998e275)
Fixes
0.3.0
React Native for Web is now structured as a monorepo (3026465). An additional benchmark introduced by the emotion project has been included; it stress-tests style updates to mounted trees.
Breaking changes
- The Babel plugin must now be installed separately:
babel-plugin-react-native-web
. Depending onreact-native-web/babel
will no longer work. - The package's internal paths have changed; if you were reaching into
react-native-web/dist
those modules have moved.
Fixes
- Fix babel rewrite for import/export/require
react-native-web
. (209bd3a) - Fix babel rewrite when importing
CheckBox
. (87fdd6c). - Fix RTL flipping of styles set via
setNativeProps
. (85aaa39) - Prevent ReactDOM hydration warnings in development. (41d90e0)
- Fix React warnings when using the
hitSlop
prop. (af47d5f) - Fix
AppRegistry.unmountApplicationComponentAtRootTag
. (6f10f6b) - Fix
StyleSheet.hairlineWidth
error whendocument.body
is missing in the client. (6d91541) - Fix development warnings for more native-only props. (fd6ccbc)
- Apply "monospace" font-family hack when needed. (b6ef1d3)
0.2.0
Breaking changes
- The
Image
component no longer accepts child content. UseImageBackground
as a replacement. (541d245)
New features
- Add
ImageBackground
component. (e8eab9b) - Add
Picker
andPicker.Item
components. (b7e970f) - Add
CheckBox
component. (6de892c) - Add
ART
components. (321051b) - Add
SafeAreaView
shim for compatibility with React Native. (034108a) - Add
StyleSheet.compose
. (1a20fcf) - Sync the
Animated
implementation with React Native to pick up new additions to the API. (0dfe319). - Sync the
PanResponder
implementation with React Native. (f96d7b8)
Fixes
- Use
ReactDOM.hydrate
inAppRegistry.runApplication
to allow clients to boot using HTML from server-rendered apps (82c044e). - Fix
AppRegistry.getApplication
style element key warning for server-side rendering.
(f1ce6c2) - Fix imports of
render
andunmountComponentAtNode
when using the Babel plugin.
(9bcc67e) - Fix error when testing Touchables using
react-test-renderer
. (5f68542) - Fix animated scrolling in
ScrollView
. (556dc89) - Fix the value of
StyleSheet.hairlineWidth
on retina screens. (495defd)
React 16 support
Compatible with React/ReactDOM 16
0.0.62
StyleSheet
now resolves React Native styles to class names and caches results (13x faster than 0.0.61)[https://github.com/necolas/react-native-web/commit/d87f71ebc11d4ac986ec39a039ec4f7c96916e7d]ActivityIndicator
andProgressBar
now use CSS animations instead ofAnimated
.
[https://github.com/necolas/react-native-web/commit/cfc56a1354960260d6e7d40e401e7b1ba43e3a7e, https://github.com/necolas/react-native-web/commit/ea75cced133358eccda1dd83292784e554afc28c]- CSS animation properties are supported; there is no public API for creating CSS keyframes in JS.