Skip to content

Force use of enums #448

Open
Open
@baileys-li

Description

@baileys-li

It's a little annoying that the library forces me to use enгms in string props.

image

I think better way is change them to Union string type. Example

type  Theme =  "dark" | "light" | "auto"

This way is more preferred in the community, for example it is advised by Matt Pocock.

Also current way not only force pushing using enum in such context, but force push enum code style. Library's enums styled like UperCamelCase in name and SCREAMING_CASE for keys. It's not suitable for every project. Even Typescript Documentation use UperCamelCase for name and case

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions