Skip to content

[RFC] Make "key" default to value of "ref" #712

@syranide

Description

@syranide

If we make key default to the value of ref if specified (plus some prefix to avoid conflicts perhaps), it seems to me like it would be a reconciliation win (key: null could be used to prevent this behavior, if it was ever needed).

The only practical difference it should make is if <input ref="a" /> is replaced by <input ref="b" /> it will now recreate the element instead of reusing it. To me that actually seems like another win, that's the behavior I would really want if that would happen and I can't think of a scenario where I wouldn't actually want that behavior.

I mentioned it briefly to @vjeux and it seemed reasonable to him at least. :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions