Closed wojtekmaj closed 1 year ago
Currently, to check if value is exactly something, we need to do it in a way that feels a bit hacky:
PropTypes.oneOf([value])
With this proposal, one could use:
PropTypes.literal(value)
to achieve the same thing.
I'm not sure the benefit here is worth the complexity of adding an entirely new propType.
Currently, to check if value is exactly something, we need to do it in a way that feels a bit hacky:
With this proposal, one could use:
to achieve the same thing.