-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[HOLD for payment 2024-10-10] [$250] [Dev] Console Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()? #49062
Comments
Triggered auto assignment to @joekaufmanexpensify ( |
This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989 |
Getting help reproducing this, since it's a dev environment bug |
ProposalPlease re-state the problem that we are trying to solve in this issue.Console warning when open a self DM report. What is the root cause of that problem?The console warning tells that we are passing a ref prop to a functional component without usign forwardRef. The main culprit is from the withOnyx and the other one is from the withCurrentUserPersonalDetails hook. If we see at the OP screenshots, it's coming from ReportTypingIndicator, but it actually happens on a lot of places and potentially on all component that uses What changes do you think we should make in order to solve the problem?Replace withOnyx usage with useOnyx hook. There are still a lot of withOnyx usage on the codebase, so we can focus on this issue on some component that triggers the warning in self DM. Here is the list of the component where we can replace the withOnyx to useOnyx and withCurrentUserPersonalDetails to useCurrentUserPersonalDetails.
|
Job added to Upwork: https://www.upwork.com/jobs/~021834579040151664712 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @allroundexperts ( |
@bernhardoj's proposal has the correct RCA and the proposed solution should fix the issue as well. Let's go with them! 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @aldo-expensify, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@bernhardoj is there an ETA for PR here? |
Sorry, I was sick. PR is ready. cc: @allroundexperts |
Hope you're feeling better, and TY! |
PR in review |
PR still in review |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.43-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2024-10-10. 🎊 For reference, here are some details about the assignees on this issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
@allroundexperts, could you handle the checklist so I can prep for payment? |
@joekaufmanexpensify I don't think a regression test and the checklist makes much sense here since the functionality is un-effected. Let me know if you think otherwise. |
Ah, yeah that is fair. TY! |
There is no reporting bonus anymore, so payment is due to @c3024 for this one. |
Only payment due here is:
|
Both of you, feel free to request payment whenever you're ready! I'm going to close the issue in the meantime, but lmk if anything else is needed! |
Requested in ND. |
$250 approved for @bernhardoj |
$250 approved for @allroundexperts |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.30-9
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/p1726072515490119?thread_ts=1726072125.690969&cid=C049HHMV9SM
Action Performed:
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
Add any screenshot/video evidence
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @joekaufmanexpensifyThe text was updated successfully, but these errors were encountered: