32
Root
7y

Material-UI.

I'm exhausted, so I'll keep this short.

I changed a TextField to a TimePicker, and noticed my className prop didn't apply anymore.

I thought it was my mui/redux-form wrapper for that component since I had just written it, but that was basically a straight copy/paste from the other wrappers, and both receives and passes the prop just fine.

After a lot of fighting, I finally found a workaround: if I add a `data-work-you-piece-of-garbage` prop alongside it, only then will the className show up on the rendered element. Why? I have no freaking clue. I tested it three times and got the same results. I looked through the MUI source and it still doesn't make any sense.

Fucking whatever, only three hours wasted.

Comments
  • 5
    Make sure you add a comment explaining this for your future self!
  • 7
    @RiderExMachina oh, i did.
    It's kind of colorful, too... 😞
  • 3
    @Ashkin
    ...if it works, it works I guess!
  • 2
    Wow this is bad :/
    When I face similar issue I usually be mistaken by only writing class instead of className lol
  • 1
    I'd say just take the dive and do CSS in JS
  • 3
    Try react-semantic-ui , if you are not limited to Material Design.
    The docs are better than MUI except for some parts like form etc. , Which you can configure yourself
  • 1
    I was reading about Material UI earlier today, and was wondering is it worth it?
    I have an existing ReactJs project that I'm considering to switch from Bootstrap to Material UI just for the sake of learning
  • 2
    @gitpush try semantic
  • 0
    @lokiiarora looks nice but is it in active developmenet? Their last commit was two months ago
  • 1
    @gitpush Material UI is very pretty.
    It's a pain to get to work, but it seems like a one-time investment.

    So. Maybe?
  • 2
    @gitpush bit it is quite stable . It's last commit was like 14 hrs ago and I'm talking about react-semantic-ui.
    I've used it in some projects of mine .
    Works like a bliss
  • 2
    @Ashkin thanks I started checking it out it is nice looking UI honestly
    @lokiiarora oh amazing, I will try it out and compare results with material UI 😀
  • 2
    @gitpush sure, do let me know :)
Add Comment