I didn’t understand.
Apart from using Typescript? What’s the benefit? Are you suggesting to use typescript for better components or to use enum? If its not typescript, how do we go about it.
Am I missing something?
Ooo, you joined the TypeScript "cult"! 😂
Haha, jokes aside, great article! 👏
I too think this is a good way to maintain components. Thanks for sharing Telmo.
Saša Šijak
For me it is much cleaner to do it like this:
size: "sm" | "md" | "lg"That way you do not have to import
Sizestype everywhere and type it in each prop and you still get type check