Here’s a tutorial I wrote on using components to help keep your code organized.

  • TheLongPrice@lemmy.oneOP
    link
    fedilink
    arrow-up
    1
    ·
    25 days ago

    That would definitely be an improvement, using classes is probably more robust. In my case, the project wasn’t too huge and it was solo, so I never hit issues with string references.

    • mrsgreenpotato@discuss.tchncs.de
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      24 days ago

      It’s a good practice to adhere to proper design patterns even on smaller projects. I also work solo on small projects :). It doesn’t really cost you anything to work with classes, it’d even say it’s easier once you get a hang of it