Skip to content

using key in attrs causes onupdate. Expected oninit #2650

Closed
@MarcWeber

Description

@MarcWeber

dev or stable mithril: https://mawercer.de/tmp/tmp/mithriltest.html

              'key': attrs.type,

I do set key, yet onupdate is called. Why ?
If I change :type to :key also replacing attrs.type by attrs.key then oninit gets called.

Setting a different key shouldn't it cause recreating the component ?

So what am I missing ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: QuestionFor issues that are purely questions about Mithril, not necessarily bug reports or suggestions

    Type

    No type

    Projects

    Status

    Closed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions