Skip to content

Throw a warning if a component's props are marked as mutable #4491

@jkelleyrtp

Description

@jkelleyrtp

Feature Request

We should throw a warning - or just outright reject - component properties marked as mutable. In Dioxus 0.4 and below, props were naturally immutable thanks to the immutable reference.

Allowing props to be mutable means users are free to implement data binding in their UI which we want to discourage. Our docs advise that you use callbacks instead of mutable signal binding on prop boundaries, and the framework should also give you a warning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions