v5.0.0-alpha.3
Pre-release
Pre-release
Enhancements
- New
source
prop which deprecateshtml
anduri
props. This prop supportsmethod
,body
andheaders
fields 🚀 - Brand new
HTMLImage
component which should be much better at adapting its size to available width. For this to happen, you must passcontentWidth
prop. We recommend usinguseWindowDimensions().width
to handle screen rotation gracefully. If you don't want your images to grow after a certain size, you could usecomputeEmbeddedMaxWidth
. Read the RFC document “A Deterministic Approach to Embedded Content Scaling” for more details. New propcomputeEmbeddedMaxWidth
(see usage above). - New prop
contentWidth
(see usage above). - New prop
htmlParserOptions
to override
htmlparser2
ParserOptions object, thanks @fabianlee1211. onLinkPress
has now a default value: open links withLinking
API
(recommended).- Add Podspec file, thanks @systemride
- New
WebView
optional prop for plugins which requires it, see @native-html/plugins, thanks @IjzerenHein - New
defaultTextProps
, thanks @Peretz30 - Export
constructStyles
,getParentsTagsRecursively
,getClosestNodeParentByTag
andIGNORED_TAGS
from index.js.
Bugfixes
- Image getting blur on iOS, #141;
img
's tagresizeMode
property not modifiable throughtagStyles
, #172;imagesMaxWidth
not working, #412
DEPRECATED PROPS (removed in v6)
allowFontScaling
, usedefaultTextProps.allowFontScaling
instead;textSelectable
, usedefaultTextProps.selectable
instead;decodeEntities
, usehtmlParserOptions.decodeEntities
instead.html
, usesource.html
instead.uri
, usesource.uri
instead.
BREAKING CHANGES
- (TypeScript users), requires minimum TypeScript version 3.5 (was 2.8)
iframe
tag element is not rendered anymore, andreact-native-webview
has
been removed from peer dependencies; use@native-html/iframe-plugin
instead, which supportsonLinkPress
and scales to content width 🚀.imagesMaxWidth
had been discontinued in favor ofcomputeEmbeddedMaxWidth
. This function takes the providedcontentWidth
as an argument, and returns the space the image should take.