-
-
Notifications
You must be signed in to change notification settings - Fork 591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React 0.74 - Update defaultProps to JavaScript default parameters. #661
Comments
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 (f0c7e34). But they failed the test. |
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
Version:
|
@djMax and @ba361006 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. |
Thank you so much. |
I switched to react-native-htmlview and it's working fine so far; smooth transation. |
@jsamr any update? |
same issue |
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @builder.io/sdk-react-native@1.0.34 ### Patch Changes - c787998: Fix: add `regeneratorRuntime` polyfill - c787998: Fix: replace `react-native-render-html` with `@builder.io/react-native-render-html` to remove `defaultProps` errors. See <meliorence/react-native-render-html#661> - c787998: Fix: disable async storage during static rendering (node.js) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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! |
Unfortunately the |
@david-cahill, I was able to use the patch suggested by @awlodarczyk above. This is how I got it to work. Add the following as devDependencies
Create a "patches" folder in the root of your project Add postinstall to your scripts section in package.json
You should now be able to run npm or yarn and get the following result. % yarn |
|
The @david-cahill for which packages do you get type declaration errors? Have you tried resolving the dependencies to updated versions? In my case (after fixing the
|
the patch works...but seriously, we need a fork and a new package |
@DanielKuhn I receive type errors for the react-native-render-html lib. It looks like the react-native-render-html/lib folder is missing in node_modules (it's not built) so imports are not working correctly. I've also tried the resolutions but without success. |
patch is working for me as well but why nobody fork the project and create new packet or creater merge to this packet |
coz looks like everyone is hoping to update official release |
Will be seeing any push to main npm package soon? I would love to see this warning gone from the cli. Thank you in advance you guys do an awesome job. |
the original author is looking for someone to take this over: |
Don't worry folks, we will fix it soon |
- added patch shared on github to update package to prevent `defaultProps` warn in `react-native-render-html` package - meliorence/react-native-render-html#661 (comment) SVA-1429
thanks, bro. |
This comment was marked as off-topic.
This comment was marked as off-topic.
The issue isn't with merging, but with deployment. The fix for that is already merged. We've lost contact with the owners of this package, and together with @jsamr, we're planning to move it to a different repository. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
@ivanoikon , thanks for the instructions. This was my first time implementing a "patch" and your instructions made it simple! |
I opened a ticket to track progress over here: #674 Note 1: pesting and requesting for this to happen quickly will not influence the process, I'm already doing the best I can, for free. Note 2: you can suppress the warning with import { LogBox } from "react-native"
LogBox.ignoreLogs([
/Support for defaultProps will be removed/,
]); See the debugging basics official guide. Note 3: this is a deprecation warning, the library still works. |
And this would suppress errors (since they are no more warnings) from appearing in console as well: if (__DEV__) {
const ignoreErrors = ["Support for defaultProps will be removed"];
const error = console.error;
console.error = (...arg) => {
for (const error of ignoreErrors) if (arg[0].includes(error)) return;
error(...arg);
};
LogBox.ignoreLogs(ignoreErrors);
} |
https://www.npmjs.com/package/@builder.io/react-native-render-html this fork seems to have already fixed this. |
Decision Table
<yyy>
is not rendered”Good Faith Declaration
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
RNRH Version
6.3.4
Tested Platforms
Reproduction Platforms
Minimal, Reproducible Example
Run in a React Native project >= 0.74
Additional Notes
No response
The text was updated successfully, but these errors were encountered: