react-native-render-html
react-native-render-html copied to clipboard
ERROR Warning: bound renderChildren: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
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
ERROR Warning: bound renderChildren: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
React Native Information
<RenderHTML
contentWidth={screenWidth - 32}
source={{ html: `<div>${item.message}</div>` }}
tagsStyles={htmlTagStyles}
defaultTextProps={{ selectable: false }}
enableExperimentalMarginCollapsing={true}
/>
RNRH Version
<RenderHTML
contentWidth={screenWidth - 32}
source={{ html: <div>${item.message}</div> }}
tagsStyles={htmlTagStyles}
defaultTextProps={{ selectable: false }}
enableExperimentalMarginCollapsing={true}
/>
Tested Platforms
- [x] Android
- [x] iOS
- [ ] Web
- [ ] MacOS
- [ ] Windows
Reproduction Platforms
- [x] Android
- [x] iOS
- [ ] Web
- [ ] MacOS
- [ ] Windows
Minimal, Reproducible Example
<RenderHTML
contentWidth={screenWidth - 32}
source={{ html: <div>${item.message}</div> }}
tagsStyles={htmlTagStyles}
defaultTextProps={{ selectable: false }}
enableExperimentalMarginCollapsing={true}
/>
Additional Notes
No response
I have the same issue when I switched from expo SDK 51 to SDK 52 and respectively from React 18.2.0 to React 18.3.1 and React Native 0.74.5 to React Native 0.76.9
I have the same issue when I switched from expo SDK 51 to SDK 52 and respectively from React 18.2.0 to React 18.3.1 and React Native 0.74.5 to React Native 0.76.9
Just got the same issue. Is this library still being maintained?
the developer doesn't care about his module? when will the error be fixed?
Bump
I created a fix that needs to be reviewed and merged. You can view the test repository here https://github.com/tristanheilman/react-native-render-html-684-test/releases
Included in the repo is a yarn patch file. You can also refer to this branch for the changes: https://github.com/tristanheilman/react-native-render-html/tree/support-RN75
Unfortunately I'm unsure how to make this repository work as a git fork with a git link in the package.json. If somebody figures that out, would be greatly appreciated. At the moment I need to installed the forked repository locally like so:
"react-native-render-html": "../react-native-render-html/packages/render-html",
OR you can utilize a patch by running yarn patch react-native-render-html and then open up the file and paste in the lib , src and package.json files over from the support-RN75 repository branch. If you do not see a lib folder, then you need to cd into the packages/render-html folder and run yarn && yarn build
+1 for needing this - it will cause the whole library to break shortly
same here...