Developer who can design.
I've been a developer and designer for well over a decade. I write about JavaScript, React, Tailwind, Next.js and much more.
Markdown supported · ⌘↵ to post
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?
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