Skip to content
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

Open
7 of 15 tasks
nd-gorm opened this issue May 15, 2024 · 23 comments
Open
7 of 15 tasks

React 0.74 - Update defaultProps to JavaScript default parameters. #661

nd-gorm opened this issue May 15, 2024 · 23 comments
Labels
bug Crush'em all.

Comments

@nd-gorm
Copy link

nd-gorm commented May 15, 2024

Decision Table

  • My issue does not look like “The HTML attribute 'xxx' is ignored” (unless we claim support for it)
  • My issue does not look like “The HTML element <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

`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

  • Android
  • 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

@nd-gorm nd-gorm added the bug Crush'em all. label May 15, 2024
@Simba-Mupfunya
Copy link

same issue as @nd-gorm

@QuentinOber
Copy link

same issue as @nd-gorm .-)

@bruce-mec
Copy link

Same, after upgrading to react native 0.74

@ivanoikon
Copy link

Same issue here. But the question is: is this project still alive?

@yeezussniper
Copy link

I see attempts to fix this (f0c7e34). But they failed the test.
There are suspicions that the project is really abandoned :(

@djMax
Copy link

djMax commented May 19, 2024

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.

@ba361006
Copy link

ba361006 commented May 21, 2024

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

@yeezussniper
Copy link

@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

@djMax
Copy link

djMax commented May 21, 2024

But this doesn't do any of the translation to React components, no? That's the main magic bit of this module, IMHO.

@yeezussniper
Copy link

No, I just needed to display the users html in the View

@chriszs
Copy link

chriszs commented May 28, 2024

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.

@linusrush
Copy link

Also looking forward to the fix release

@bytemtek
Copy link

same issue as @nd-gorm

@IvanMijic0
Copy link

Same issue as @nd-gorm

@Cube321
Copy link

Cube321 commented Jun 13, 2024

same issue as @nd-gorm

@bytemtek
Copy link

Is there any solution ?

@ivanoikon
Copy link

I solved switching to this library while waiting for a fix react-native-html-text-view.

@bytemtek
Copy link

I solved switching to this library while waiting for a fix react-native-html-text-view.

Thank you so much.

@QuentinOber
Copy link

I switched to react-native-htmlview and it's working fine so far; smooth transation.

@tmeduho
Copy link

tmeduho commented Jun 17, 2024

@jsamr any update?

@AronBe
Copy link

AronBe commented Jun 18, 2024

@skb1129 was the work done but not yet released?

f0c7e34

@tmeduho
Copy link

tmeduho commented Jun 24, 2024

@AronBe correct, see #660

@ycldz
Copy link

ycldz commented Jul 4, 2024

same issue

samijaber added a commit to BuilderIO/builder that referenced this issue Jul 5, 2024
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Crush'em all.
Projects
None yet
Development

No branches or pull requests