Skip to content

[$250] [Dev] Console Warning: ERROR Warning: A props object containing a “key” prop is being spread into JSX: #49064

Closed

Description

@m-natarajan

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: 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/p1726072795900059?thread_ts=1726072125.690969&cid=C049HHMV9SM

Action Performed:

  1. Logon to ND on iOS App
  2. Go to the self DM page
  3. Track an Expense
  4. Click on Share with accountant in the whisper
  5. Continue with the flow till the merchant page.

Expected Result:

No console warning on the workspace merchant page.

Actual Result:

Console Warning
ERROR Warning: A props object containing a “key” prop is being spread into JSX:
let props = {key: someKey, ref: ..., valueType: ..., name: ..., defaultValue: ..., maxLength: ..., label: ..., accessibilityLabel: ..., role: ..., shouldSetTouchedOnBlurOnly: ..., blurOnSubmit: ..., onSubmitEditing: ..., returnKeyType: ..., inputID: ..., errorText: ..., value: ..., onTouched: ..., onPress: ..., onPressOut: ..., onBlur: ..., onInputChange: ...};
<ForwardRef(TextInput) {...props} />

Workaround:

Unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021836067438259125444
  • Upwork Job ID: 1836067438259125444
  • Last Price Increase: 2024-09-17
  • Automatic offers:
    • gijoe0295 | Contributor | 104010367
Issue OwnerCurrent Issue Owner: @puneetlath

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 12, 2024
  2. melvin-bot commented on Sep 12, 2024

    @melvin-bot

    Triggered auto assignment to @puneetlath (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.

  3. MelvinBot commented on Sep 12, 2024

    @MelvinBot
    Contributor

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

  4. gijoe0295 commented on Sep 12, 2024

    @gijoe0295
    Contributor

    Edited by proposal-police: This proposal was edited at 2024-09-12 23:05:24 UTC.

    Proposal

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

    Console Warning: A props object containing a “key” prop is being spread into JSX

    What is the root cause of that problem?

    This happens in the InputWrapper where we apply spread operator for registerInput which contains key prop:

    return <InputComponent {...registerInput(inputID, shouldSubmitForm, {ref, valueType, ...rest, shouldSetTouchedOnBlurOnly, blurOnSubmit})} />;

    key: inputProps.key ?? inputID,

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

    Separate the key and other props from registerInput:

    const {key, ...restProps} = registerInput();
    return <InputComponent key={key} {...restProps} />;

    Additionally, we might need to double check every places where we use spread operator for component props to ensure they do not spread key. We can leverage the eslint-disable-next-line react/jsx-props-no-spreading lint for this case.

  5. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Sep 17, 2024
  6. changed the title [-][Dev] Console Warning: ERROR Warning: A props object containing a “key” prop is being spread into JSX:[/-] [+][$250] [Dev] Console Warning: ERROR Warning: A props object containing a “key” prop is being spread into JSX:[/+] on Sep 17, 2024
  7. melvin-bot commented on Sep 17, 2024

    @melvin-bot
  8. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Sep 17, 2024
  9. 8 remaining items

  10. melvin-bot commented on Sep 17, 2024

    @melvin-bot

    📣 @gijoe0295 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

    Offer link
    Upwork job
    Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
    Keep in mind: Code of Conduct | Contributing 📖

  11. gijoe0295 commented on Oct 1, 2024

    @gijoe0295
    Contributor

    @puneetlath PR reach production on Sep 25. Should be ready for payment on Oct 2.

  12. gijoe0295 commented on Oct 4, 2024

    @gijoe0295
    Contributor

    @puneetlath Ready for payment.

  13. puneetlath commented on Oct 6, 2024

    @puneetlath
    Contributor

    Sorry for the delay!

    Payment summary:

    Thanks everyone!

  14. garrettmknight commented on Oct 15, 2024

    @garrettmknight
    Contributor

    $250 approved for @jayeshmangwani

  15. gijoe0295 commented on Oct 22, 2024

    @gijoe0295
    Contributor

    @garrettmknight @puneetlath Hi I haven't received payments for this yet. My Upwork profile is https://www.upwork.com/freelancers/~0187ef68b8203dabee.

  16. garrettmknight commented on Oct 23, 2024

    @garrettmknight
    Contributor

    @puneetlath did you pay @gijoe0295 somewhere else?

  17. puneetlath commented on Oct 23, 2024

    @puneetlath
    Contributor

    Oh hm, weird. The upwork job shows up as unpaid: https://www.upwork.com/nx/wm/workroom/38445346/overview. It must've been during the time when Upwork was having the payment bug because the contract shows as completed. In any case, I've added the payment as a bonus, so you should have it now @gijoe0295. Sorry about that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorNeeds ReproductionReproducible steps neededReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions