-
-
Notifications
You must be signed in to change notification settings - Fork 149
Closed
Description
The problem
When using poly variants for string enums, we transformed a lot of "string-with-dash" to camel case stringWithoutDash, relying on ReScript @as
annotation.
Now that ReScript allows poly variants to have string syntax, we could change this choice to make it more straight forward to new ReScript user that are familiar with React Native.
Considered solution
We could make this a breaking change. Maybe a codemod will help.
Alternatives solutions
We can also:
- add strings values (so people can use both syntax (with-dash or withoutDash) and keep both (maintenance++)
- integrate both & deprecate later withoutDash if that possible (syntax seems to be accepted but it doesn't seems to show the warning - I tested
| @deprecated("use #\"plain-text\" instead of #plainText") @as("plain-text") #plainText
inAlert.res
)
Metadata
Metadata
Assignees
Labels
No labels