Skip to content

Fix default props when using withOnyx#795

Merged
roryabraham merged 6 commits intomasterfrom
amechler-fix-default-props
Nov 17, 2020
Merged

Fix default props when using withOnyx#795
roryabraham merged 6 commits intomasterfrom
amechler-fix-default-props

Conversation

@alex-mechler
Copy link
Copy Markdown
Contributor

Hold on Expensify/react-native-onyx#5

Fixed Issues

Fixes https://github.com/Expensify/Expensify/issues/144333

Tests

Repeated on Web, Desktop, Simulator iOS, Simulator Android. These tests cover most cases we would run into. Happy to add more tests if there is anything you would like to see specifically

  1. Signed into an account
  2. Created a chat with a user account had previously not chatted with
  3. Sent a message
  4. Created a chat with a user account had previously chatted with
  5. Sent a message
  6. Created a group chat
  7. Sent a message
  8. Signed out

Screenshots

N/a

@alex-mechler alex-mechler requested a review from a team as a code owner November 13, 2020 21:48
@alex-mechler alex-mechler self-assigned this Nov 13, 2020
@botify botify requested review from joelbettner and removed request for a team November 13, 2020 21:49
@roryabraham
Copy link
Copy Markdown
Contributor

roryabraham commented Nov 17, 2020

I ran into an issue using the chat switcher. To reproduce:

  1. Start typing in ChatSwitcherSearchForm
  2. Use the down arrow key to select a chat
  3. Hit enter to go to the chat
  4. The URL looks correct, but I get a white screen error:

image

And here are some log snippets:

Warning: Failed prop type: The prop `defaultValue` is marked as required in `TextInputFocusable`, but its value is `null`.
    in TextInputFocusable (created by ForwardRef)
    in ForwardRef (created by ReportActionCompose)
    in div (created by View)
    in View (created by ReportActionCompose)
    in div (created by View)
    in View (created by ReportActionCompose)
    in ReportActionCompose
    in withOnyx(ReportActionCompose) (created by ReportView)
    ...
    ...

Uncaught TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at new ReportTypingIndicator (ReportTypingIndicator.js:24)
    at constructClassInstance (react-dom.development.js:12880)
    at updateClassComponent (react-dom.development.js:17100)
    at beginWork (react-dom.development.js:18620)
    at HTMLUnknownElement.callCallback (react-dom.development.js:188)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:237)
    at invokeGuardedCallback (react-dom.development.js:292)
    at beginWork$1 (react-dom.development.js:23203)
    at performUnitOfWork (react-dom.development.js:22154)

@alex-mechler
Copy link
Copy Markdown
Contributor Author

Hmmm, I'm having trouble reproducing. Did you make sure to npm i after pulling this branch?

Alexander added 3 commits November 16, 2020 17:42
@roryabraham
Copy link
Copy Markdown
Contributor

Oops, no I did not. It worked after running npm i

roryabraham
roryabraham previously approved these changes Nov 17, 2020
Copy link
Copy Markdown
Contributor

@roryabraham roryabraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alex-mechler alex-mechler changed the title [HOLD Onyx/5] Fix default props when using withOnyx Fix default props when using withOnyx Nov 17, 2020
@alex-mechler
Copy link
Copy Markdown
Contributor Author

alex-mechler commented Nov 17, 2020

Off hold, also bumped hash to latest changes

Copy link
Copy Markdown
Contributor

@roryabraham roryabraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, merging

@roryabraham roryabraham merged commit 82132e1 into master Nov 17, 2020
@roryabraham roryabraham deleted the amechler-fix-default-props branch November 17, 2020 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants