9

Today was a bad dev day working on a shitty React project. Not that React in itself is bad, but it can be hell to work with when the code is a big pile a crap full of anti pattern code. I spent the day refactoring to try to fix a bug, but to no avail. It would take days if not weeks to put some order in this mess and to prevent such bugs.

Comments
  • 1
    You are doing fine

    Keep going. You will fix that sooner
  • 1
    Ah man, I'm in the same. We have a Vue app which is one big spagetti with huge methods and bad abstractions. I've stopped trying to hard to improve it and just accept it. I try to implement new features cleanly, but debugging is hell.
  • 1
    I'm using a different framework right now in my job and planning to expand my knowledge by studying React to be flexible in finding jobs as I'm planning to walk away from my current company.

    How are React codebases in a corporate world, are they fully hooks based or are still react classes lurking around somewhere around as technical debt?
  • 0
    @sleepydev I inherited a 100% class based JS React project. I migrate to hooks and TS as I fix bugs and develop new features. They don’t want to allocate extra time to do this
  • 1
    @black-kite I'm no React or Front end developer, but is a class-based JS project bad?
  • 1
    @asgs From what I understand React has moved toward functional components as they want to encourage devs to split the code more into small smaller bricks with higher reusability (sharing state between components is easier with hooks…)
    Although one could argue that Angular also encourages keeping their class based components small and reusable as well…
    I’m not an advocate for either one. I use both Angular and React. I guess the main reason I’m migrating toward hooks is to stick with the later versions of the library and the optimizations that come with it. Also many libraries written for React have moved toward hooks as well and can’t be used with React class components anymore (at least their latest versions)
Add Comment