Client side Upload button disabling

one more question. In my form, i need "selectedCategory" to be selected. It is a useState which is either undefined or has a category value. Is there a way I can disable the upload button if that state variable is undefined (user must have category selected)? Thanks!
I did this in core.ts
if(selectedCategory === "") throw new UploadThingError("Need a category to be selected")
But can i do this client-side too?
Was this page helpful?