• 1 Post
  • 19 Comments
Joined 1 year ago
cake
Cake day: July 3rd, 2023

help-circle
  • All the childish stuff he does aside, if that wasn’t enough, my problem with him is that he’s actively promoting fascist and undermining the working class.

    This mother fucker has all the money in the world and he’s not content to do the kid dream stuff you describe, he’s actively helping fascist spread misinformation and is actively fighting against good wages and conditions for the working class.

    So yea, fuck Elon and pretty much all of the rest of the billionaires.



  • Very interesting. Actually the part you mention about there being an initial 'btn' class is a good point. Using arrays and joining would be nice for that. I wish more people would chime in. Because between our two examples, I think mine is more readable. But yours would probably scale better. I also wonder about the performance implications of creating arrays. But that might be negligible.


  • Ok how about this then, I frequently do something like this:

    let className = 'btn'
      if (displayType) {
        className += ` ${displayType}`
      }
      if (size) {
        className += ` ${size}`
      }
      if (bordered) {
        className += ' border'
      }
      if (classNameProp) {
        className += ` ${classNameProp}`
      }
    

    How would this be made better with a functional approach? And would be more legible, better in anyway?