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

Data Duplication issue using react-hook-form #1449

Open
2 tasks done
amjadbouhouch opened this issue Dec 13, 2024 · 1 comment
Open
2 tasks done

Data Duplication issue using react-hook-form #1449

amjadbouhouch opened this issue Dec 13, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@amjadbouhouch
Copy link

Current behavior

I have a list of questions and answers (Q/A) where the state is managed by react-hook-form. When there are many questions and the user scrolls, the answers get duplicated in the UI. For example, the answer for the first question appears again in a later question, even though the underlying data is correct.

Here’s a reproduction of the issue: https://snack.expo.dev/@amjedbouhouch/react-hook-form-flash-list-issue?platform=android

ScreenShots

Image Image

Expected behavior

To Reproduce

https://snack.expo.dev/@amjedbouhouch/react-hook-form-flash-list-issue?platform=android

Platform:

  • iOS
  • Android

Environment

1.6.4

@amjadbouhouch amjadbouhouch added the bug Something isn't working label Dec 13, 2024
@amjadbouhouch
Copy link
Author

amjadbouhouch commented Dec 14, 2024

Adding a key in ItemComponent solves the problem, But this is not what I want because I think it has a performance Impact & forces React to unmount and remount.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant