Skip to content

key property #101

Open
Open
@coot

Description

@coot

The key property is write only property, that can be placed on props, but react warns if you're trying to access it from within a component. It would be nice to find a proper way to encode this. Better than just adding key to property type. The simplest soluting would be to have an unsafe method:

setKey :: forall a. String -> a -> a

Another solution would be to have a a class with a setKey method, but then for every prop type one would have to implement it (maybe generic deriving could help with this).

Any other ideas?

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