Release 6.0.0-alpha.11
Pre-release6.0.0-alpha.11 (2021-01-27)
Bug Fixes
- inject textProps in TText renderers (29ea34c)
- missing proptype (onHTMLLoaded) (74a56ae)
- prettier, consistant and scalable list rendering (7c2e26a)
Code Refactoring
Features
- add getStyleFromNetstLevel prop to HTMLListElement (5695fea)
- expose default renderers logic for extensibility (691f9cf), closes #424
- implement
defaultTextProps
prop (13d7abf) - implement
useInternalRenderer
hook to reuse internal rendering logic (add307c) - implement computeEmbeddedMaxWidth prop as per RFC001@2.0.0 (9ee8475)
- nesting ol and ul will result in disinct bullet style types (a18016f), closes #312
- port
alterData
,alterChildren
andalterNode
(1e0002b) - port
ignoreDOMNode
hook (8a0d14f) - port
ignoredTags
prop (9d2f5d5) - port
emSize
prop (f567532) - safe typeguards in
extendDefaultRenderer
(eb565df) - support
htmlParserOptions
prop (3e5de96) - support
source
prop, identical to react-native-webview (ed74eb9) - support WebView and defaultWebViewProps (fe177d7)
BREAKING CHANGES
-
ignoreNodesFunction
has been renamedignoreDOMNode
. -
the names of hooks to alter DOM content have been changed for clarity:
alterData
becomesalterDOMData
alterChildren
becomesalterDOMChildren
alterNode
becomesalterDOMElement
-
dropped ptSize prop. Point is supposed to be an absolute (pixel independant) size and unfit for display devices. It will be translated by the CSS processor to an absolute unit.
-
containerStyle
andcustomContainer
props have been dropped. UsebaseStyle
prop instead to style the root component. -
drop
textSelectable
andallowFontScaling
. UsedefaultTextProps.selectable
anddefaultTextProps.allowFontScaling
instead. -
uri
andhtml
props have been dropped. Replaceuri
withsource={{ uri: 'http://...' }}
andhtml
withsource={{ html: '<div> ...' }}
. The former now allowsbody
,headers
andmethod
fields. -
decodeEntities
prop has been dropped. Pass this option tohtmlParserOptions
prop instead. -
computeImagesMaxWidth
has been replaced withcomputeEmbeddedMaxWidth
. The two props are very similar, but the latest takes an extra argument, "tagName", which is the tag for which a width constrain should be enforced. It is planned to work with the @native-html/iframe-plugin extension. -
the object returned by
splitBoxModelStyle
has more legible field names,boxModelStyle
andotherStyle
. -
extendRenderer
has been renamed toextendDefaultRenderer
. Also note:- The first argument can be the name of the tag to extend;
- The second argument is now a partial model;