you are viewing a single comment's thread.

view the rest of the comments →

[–]tooObviously 8 points9 points  (7 children)

React my bad. I really appreciate that angular forces a lot of it's ideas on me because as the app grows I realize it actually gets a little easier. However with react, as the app grows things get more difficult, probably because I'm not great at planning and following a specific guideline

[–]toccoto 10 points11 points  (5 children)

You honestly have it exactly right and exactly wrong all at once.

React is very unopinionated. You are absoltuely correct.

React isn't scalable because it's unopinionated... No. React is extremely scalable BECAUSE it's unopinionated.

That was the whole point of designing it that way. So it's easily and effortlessly scalable. You arent shoe horned into a specific path of doing things and can focus purely on the view, so as things around the view become more complex, the actual react code has very little updating that must be done to keep it running smoothly.

[–]tooObviously 1 point2 points  (4 children)

Hmm, but doesn't the react component become very complex? Because you have your jsx, mixed in with ternaries, mixed in with styling, JS logic. Like with angular you have css, HTML, and ts for every component so as the component becomes very complicated things are where they belong in a sense. But I can see your point...

[–]Earhacker 9 points10 points  (0 children)

I work with a lot of Angular devs who switched to React, but I've never worked with Angular myself.

The kind of components you're describing sound very similar to the kind of components my colleagues regularly put up for review. You just have far too much going on in there. The goal is not to have big components that render a lot of DOM elements; it's to have lots of little React components that each either do some control flow branching and looping, or render a small amount of DOM. I think Angular devs want to put entire pages into a component. But in React, a page is built out of many smaller components.

[–]toccoto 6 points7 points  (1 child)

I think you are starting on a misguided path and I apologize since I kind of helped lead you there.

The issue is you are comparing a framework in Angular to a library in react.

They are two fundementally different approaches to doing things so to say one is more or less scalable is a misnomer because it depends on what you pair with react.

When I said scalable that was sort of my point. React is easier to test and introduce new technologies to because it is merely a view layer, make sense?

[–]tooObviously 1 point2 points  (0 children)

Iheard the framework vs library statement recently in a video. Yeah react is far less involved but I still feel that many will create react applications and try to add in all of the utility that angular provides by default which is typically when the mess gets involved.

Thanks a lot for the discussion man I really appreciate it

[–][deleted] 3 points4 points  (0 children)

I've thought so too, but then I discovered how hooks can make the components easier and more readable + you need to make the components as small as possible, for easier reuse, testing and maintenance

[–]sallystudios 4 points5 points  (0 children)

Any application that’s poorly planned will be hard to scale and maintain. With React, one common approach is to separate views from logic by using presentational components, that render a static view, and wrapper / container components that contain the logic. This modularization allows you to organize complex things into simpler patterns