react-native-render-html
react-native-render-html copied to clipboard
React 0.74 - Update defaultProps to JavaScript default parameters.
Decision Table
- [X] My issue does not look like “The HTML attribute 'xxx' is ignored” (unless we claim support for it)
- [X] My issue does not look like “The HTML element
<yyy>is not rendered”
Good Faith Declaration
- [X] I have read the HELP document here: https://git.io/JBi6R
- [X] I have read the CONTRIBUTING document here: https://git.io/JJ0Pg
- [X] I have confirmed that this bug has not been reported yet
Description
Hi it seems most components are setup to use TS defaultProp, which will be removed from function components. I suppose this future error is present in all components using defaultProps.
React Native Information
`Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.`
`MemoizedTNodeRenderer: Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead.`
RNRH Version
6.3.4
Tested Platforms
- [X] Android
- [X] iOS
- [ ] Web
- [ ] MacOS
- [ ] Windows
Reproduction Platforms
- [ ] Android
- [ ] iOS
- [ ] Web
- [ ] MacOS
- [ ] Windows
Minimal, Reproducible Example
Run in a React Native project >= 0.74
Additional Notes
No response
same issue as @nd-gorm
same issue as @nd-gorm .-)
Same, after upgrading to react native 0.74
Same issue here. But the question is: is this project still alive?
I see attempts to fix this (https://github.com/meliorence/react-native-render-html/commit/f0c7e34571f613fc70d183955661cd23df420238). But they failed the test. There are suspicions that the project is really abandoned :(
I reached out with an offer to sponsor and have not heard back, so I have similar concerns. Perhaps time for a fork? Or perhaps @meliorence can add a maintainer.
same here, will show the warning as below
ERROR Warning: TNodeChildrenRenderer: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
ERROR Warning: MemoizedTNodeRenderer: Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead.
ERROR Warning: TRenderEngineProvider: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
Version:
- react-native-render-html:
6.3.4 - react native:
0.74.1 - react:
18.2.0
@djMax and @ba361006 Eventually, I took this package and made it for myself inside my project
https://www.npmjs.com/package/htmlparser2-without-node-native
But this doesn't do any of the translation to React components, no? That's the main magic bit of this module, IMHO.
No, I just needed to display the users html in the View
The CI step that failed when merging a fix in #658 was a linting step. Lint errors were fixed in #660, in which regarding the potential for a release the maintainer said, "I cannot promise anything, but will consider releasing when I find some time off." So, a fix may be released, but not on any definite timeline.
Also looking forward to the fix release
same issue as @nd-gorm
Same issue as @nd-gorm
same issue as @nd-gorm
Is there any solution ?
I solved switching to this library while waiting for a fix react-native-html-text-view.
I solved switching to this library while waiting for a fix react-native-html-text-view.
Thank you so much.
I switched to react-native-htmlview and it's working fine so far; smooth transation.
@jsamr any update?
@skb1129 was the work done but not yet released?
https://github.com/meliorence/react-native-render-html/commit/f0c7e34571f613fc70d183955661cd23df420238
@AronBe correct, see https://github.com/meliorence/react-native-render-html/pull/660
same issue
same issue for me, try switch to react-native-htmlview
@tmeduho So, do we have to wait now? or can we use this GitHub branch as a package on my project? Is there any workaround?
Unfortunately, react-native-htmlview is missing a lot of features that this library has, which makes it a less than ideal replacement. At least, in my experience.
Hoping for a release soon!
if someone needs, here is patch-package fixing issue
How can be used?
Hi Adam, amazing, thanks so much! :) However, I also struggle a bit how to properly implement it to the project. Would it be possible to give us few words of guidance? Thank so much! Jakub
@ivanoikon @Cube321 patch-package is an npm package that allows to make modifications in npm dependencies. see in the provided link.