DEV Community

Discussion on: showDEV - A place to share personal and open-source coding projects!

Collapse
 
samwightt profile image
Sam Wight

So cool!

Do you have any tips on creating custom UI components with Tailwind and React? One of the things that I've struggled with in the past has been managing multiple states (eg. a button with a success instead of primary theme that's also loading or disabled). What tools are you using to help manage that?

Collapse
 
theuserll profile image
L.L.

@sam Wight, hi.

Thank you so much. Honestly, this is my second project with TailwindCSS and I just watched all the videos that they have here: tailwindcss.com/screencasts/

Maybe this is not the correct or better way, but I use Context API to manage my state and when necessary, the classes will be based on the state.

Not sure if that helps. :s

Collapse
 
samwightt profile image
Sam Wight

No that helps a lot, thank you so much! I didn't know those screencasts existed, so I'll give them a look!

Thread Thread
 
theuserll profile image
L.L.

They are pretty condensed with good information to get you start fast!