• 2 Posts
  • 40 Comments
Joined 1 year ago
cake
Cake day: August 8th, 2023

help-circle






  • YIj54yALOJxEsY20eU@lemm.eetoProgrammer Humor@programming.devcodeStyle
    link
    fedilink
    arrow-up
    6
    arrow-down
    1
    ·
    edit-2
    8 months ago

    I hate that the convention for naming React.useState variables is [color, setColor], rather than [color, colorSet]. After I declare ‘color’, I want to copy/paste that variable and append ‘Set’, rather than copy the variable then writing ‘set’ then pasting then navigating to the 4th character then flipping the case.

    Granted there could be some ambiguity if there was a variable containing a unique collection (aka set) but that is far less common than declaring a useState variable. I’d even settle for appending ‘SET’ to quell the confusion.












  • I’ve been getting these types of recommendations as well but unfortunately I’ve only seen one good one, for the most part they are low quality/beginner content. I like the effort though. I’d pay for premium if they tried to get back to early YouTube, restored the dislike button, fixed the search functionality, only recommend videos related to what im watching, and didn’t optimize their algorithm to murder my attention span.