Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.34k stars 2.77k forks source link

[Dev] Console Warning: TRenderEngineProvider: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead. #49035

Open m-natarajan opened 1 week ago

m-natarajan commented 1 week ago

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: Reproducible in staging?: Needs reproduction Reproducible in production?: Needs Reproduction If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: @c3024 Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1726072125690969

Action Performed:

  1. Visit the login page on Android App

Expected Result:

No console warning

Actual Result:

Console Warning

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

Screenshots/Videos

Screenshot 2024-09-11 at 7 37 18 PM

Add any screenshot/video evidence

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @paultsimura
melvin-bot[bot] commented 1 week ago

Triggered auto assignment to @muttmuure (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

MelvinBot commented 1 week ago

This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989

mkzie2 commented 1 week ago

Proposal

Please re-state the problem that we are trying to solve in this issue.

Console Warning: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.

What is the root cause of that problem?

This problem happens after RN 0.74 when you use the old component's defaultProps:

Screenshot 2024-09-12 at 15 03 43

What changes do you think we should make in order to solve the problem?

I see in the latest code base, they attempted removing defaultProps in this PR https://github.com/meliorence/react-native-render-html/pull/658 but it has not been released yet.

In the meantime, we can apply a patch as suggested in this thread to solve the issue, not only in TRenderEngineProvider but also in other components.

melvin-bot[bot] commented 4 days ago

Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.

melvin-bot[bot] commented 4 days ago

Triggered auto assignment to Contributor-plus team member for initial proposal review - @paultsimura (External)

melvin-bot[bot] commented 4 days ago

@muttmuure Eep! 4 days overdue now. Issues have feelings too...

paultsimura commented 3 days ago

The proposal by @mkzie2 looks OK, but it means adding a new patch, which we aim to avoid if possible.

Seems like the react-native-render-html is looking for new maintainers, so we have 2 options here:

  1. Use the suggested patch
  2. Make the upstream fix and wait for it to be merged after a new maintainer is assigned
  3. Wait for the upstream fix to be done without our participation

I'll let the assigned Engineer decide.

🎀👀🎀 C+ reviewed

melvin-bot[bot] commented 3 days ago

Triggered auto assignment to @lakchote, see https://stackoverflow.com/c/expensify/questions/7972 for more details.