You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, HTMLView's definitions specify the following props to accept function components only: NodeComponent, RootComponent, TextComponent
However, the source code that uses these props, only uses destructuring assignment to extract these from the HTMLView's props, and then creates these components as JSX tags:
This approach is compatible for use with both functional and class components.
In fact, I am using class components for these, and there are no problems.
Except: the TS definitions will issue a warning about failed prop types: Warning: Failed prop type: Invalid prop 'TextComponent' of type 'object' supplied to 'HtmlView', expected 'function'.
Can you please update the TS definitions to fix this?
The text was updated successfully, but these errors were encountered:
Currently, HTMLView's definitions specify the following props to accept function components only:
NodeComponent
,RootComponent
,TextComponent
However, the source code that uses these props, only uses destructuring assignment to extract these from the
HTMLView
's props, and then creates these components as JSX tags:RootComponent
:react-native-htmlview/HTMLView.js
Line 119 in 457751b
NodeComponent
:react-native-htmlview/htmlToElement.js
Line 150 in 457751b
TextComponent
:react-native-htmlview/htmlToElement.js
Line 134 in 457751b
This approach is compatible for use with both functional and class components.
In fact, I am using class components for these, and there are no problems.
Except: the TS definitions will issue a warning about failed prop types:
Warning: Failed prop type: Invalid prop 'TextComponent' of type 'object' supplied to 'HtmlView', expected 'function'.
Can you please update the TS definitions to fix this?
The text was updated successfully, but these errors were encountered: