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

Why is data-key needed? #326

Closed
patchthecode opened this issue Apr 15, 2021 · 1 comment
Closed

Why is data-key needed? #326

patchthecode opened this issue Apr 15, 2021 · 1 comment
Labels

Comments

@patchthecode
Copy link

Thanks for this library. It is well done.

I have a question on design.
Why is the data-key needed?

you said this

it is used for identifying item size.

I was just wondering if this was the only reason. It is a little difficult i think that the data needs to always have this when it is unnecessary (from the data's end).

Is there a way to assign some default ID for data that does not have force someone to change to data in order to use the library?

I am thinking that it might be better if there was an option if the component asked for the key on each iteration. This was, I can provide some arbituary ID instead of modufying the data. What are your thoughts?

@tangbc
Copy link
Owner

tangbc commented Oct 1, 2021

Its ok without data-key if item size is fixed size, otherwise if dynamic size list it need identify each item size.

@tangbc tangbc closed this as completed Oct 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants