News for hackers. Stuff that matters.
Re:React best practices by city41 on Monday May 03, 2021 @05:48PM (#27031170)
React is very flexible and tries to avoid strong opinions, so the result is React devs have built up lots of their own opinions over the years. React code bases are almost always wildly different from each other, a blessing and a curse.

I personally wasn't a fan of any advice in this article. But again, it's all just opinion and personal experience. I didn't feel anything covered fell in the area of best practices.

Re:React best practices by mattmanser on Monday May 03, 2021 @05:49PM (#27031188)
I've already commented on the GP, but that's not a good thing in my experience in the long run.

Techs that quickly end up with a general "best practice" code style are a lot easier to work with, and a lot, lot, lot, lot easier to maintain.

Re:React best practices by zdragnar on Monday May 03, 2021 @05:54PM (#27031251)
Clojure and co are a similar vein of favoring small, focused practices and libraries over one-size-fits-all frameworks.

YMMV, but having been on both sides of this equation at companies large and small, I find the library (I.e. react) approach favorable over the framework (I.e. angular or ember) approach.

Re:React best practices by mattmanser on Monday May 03, 2021 @06:01PM (#27031347)
That's got nothing to do with my comment though. At all, like whoosh, you've completely missed the point of it.

My point was that it doesn't matter if it's a framework, library, language, configuration, or whatever. If the design of that thing means that the community coalesces around a particular style of usage, it's much better for everyone in the long run.

Re:React best practices by slver on Monday May 03, 2021 @05:51PM (#27031217)
Case in point I literally only use JSX and ReactDOM.render().

Some would call this a blasphemy. Works great.

Re:React best practices by seumars on Monday May 03, 2021 @06:12PM (#27031492)
One react codebase being different from the next is pretty much the norm. I even doubt that the majority of react developers have fully transitioned from classes to hooks.
Re:React best practices by slver on Tuesday May 04, 2021 @06:23AM (#27035890)
But is it typical to use neither hooks nor classes?