Skip to content

Type children key statically #39

Open
@chenglou

Description

@chenglou

We use currying for ref and key already. There might be some phantom types/GADT things we can use here to statically type the fact that children key exists. More info: https://github.com/reasonml/rehydrate/blob/6808bf1a19e701214e4456967b4aab155d79802c/src/reactRe.re#L60

Alternatively, @jordwalke can take the occasion to design this away without needing fancy types, with his OrderedMap idea (jordan can talk more about this).

The benefit is that this is the last feature we need in order to completely bypass createElement (which sets up the key warning, that we currently piggyback on), and make every JSX render twice faster.

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