4 ms·
I've yet to find a problem with React that would justify learning one of those new frameworks. I know it's popular to say React is bad on the internet, but have
by ggregoire 2y ago
I've yet to find a problem with React that would justify learning one of those new frameworks. I know it's popular to say React is bad on the internet, but have been using it for 10 years now and it's still going strong in my opinion.
(For some background, I used to code SPAs from scratch with vanilla JS and jQuery in the 2000s, then switched to backbone.js then Angular, before picking up React that solved all the design issues of Angular)
- rk06 2y agoUseEffect(), dependency tracking, too much re-renders?? Problems galore in react, you should try out new js frameworks. Atleast vue and solid, to see what else is on the table
- codinhood 2y agoThere are definitely problems with react, but I think his point was that they're not big enough to justify a change. Though I agree trying other frameworks is a good practice. See what you're missing, or understand your preferred framework better.
- mcv 2y agoEvery framework has its shortcomings, and React just as much so as any other. Learning other frameworks is always worthwhile. I've done Angular, Vue, React, and am currently looking into Svelte.
- xrd 2y agoThe problems aren't with React itself. The problems are external to React. But, that's a huge problem. You need to use a separate library for CSS with React. Svelte has the best way to deal with CSS built in. Which CSS library do you choose for your React project? There are so many libraries to consider, and so many bugs in each of those libraries. You need to use a separate state management library with React. Svelte has state management built in. Which state management library do you choose for your React project? There are so many to consider, and so many bugs. People think they want to use React because of the "ecosystem." But, they don't realize that React coerces you to use an ecosystem, an ecosystem that is full of buggy software and those bugs create impossible permutations of configuration issues and bugs (see Create React App). Bugs are not specific to React at all, all software has bugs. But, React forces you to use an ecosystem, and that's a bad thing. I write a lot of Svelte code with very few external libraries. React does give you job security fixing all those bugs. I'll give you that. It is a wise career choice. Svelte 5 is a big change. But, today, I refactored a bit of reactive code (which talks to a server and uses async code) inside a single template into an external shared component. That component has reactive code that can be shared across Svelte UI components. I could do that before with stores, but I had to be careful about how to use the reactivity. This new component isolates the reactivity in the right way and shares it in the right way. And, that share component is testable. It is an incredible experience when you get it.
- esafak 2y agoIt's only job security if you are fixing another person's bug, otherwise management will rightly ask why you introduced the bug.
- SR2Z 2y agoBold of you to assume that management will notice this bug or care if it's something minor on the frontend!
- crab_galaxy 2y ago> You need to use a separate library for CSS with React I mean you can just use CSS. Personally I use css modules. Not very buggy or react specific. > a separate state management library Yeah I do use tanstack query to manage server state. Does Svelte include something similar out of the box? Otherwise it’s 1) url/query param for app state 2) tanstack query for server state 3) hooks for reusable state or local component state. Not many library bugs with that approach and tbh I’ve never needed something like redux or zustand.
- snapetom 2y agoI was trying to learn React shortly after hooks came out. Some in the community claimed you can drop Redux, which totally baffled me. Redux was far simpler. Then it became “wait just don’t use hooks till we work out the issues.”
- croes 2y agoUsing it as a developer or as a user?
- qudat 2y agohttps://bower.sh/react-is-bad-because-its-great https://bower.sh/react-is-bad-because-its-great If you are building an SPA there is no reason to choose something other than React. Many of these other frameworks focus on apps that aren't full-blown SPAs. Htmx, deno fresh, astro, remix, next.js, these are all designed for users that don't want SPAs. I think that's great, but often we conflate these use cases which cause mass confusion. Htmx is not great for highly dynamic "desktop class" web apps and the same goes for next.js.
- lenkite 2y agoReact has kept changing its design approach and best practices every two years - probably to keep the bootcamps always running and churning the change industry.
- Tadpole9181 2y agoWhy write this comment? All you're doing is showing you don't actually use React? React absolutely does not change paradigm every two years.
- lenkite 2y agoWhy downvote when this is perfectly known in basic history ? Maybe you only started using React recently ? Previously,class components were the primary way to manage state and lifecycle methods. Lifecycle methods like componentDidMount, componentDidUpdate, and componentWillUnmount were heavily used. Now, functional components with Hooks (useState, useEffect, etc.) are the best practice. There were several iterations of different practices in between. Previously, props were passed through multiple layers of components (prop drilling was established practice). Now Context is used. State management, event handlers, component structure, CSS-in-JS: pretty much everything has changed over time. No - I used React in the past, but no longer use it. Maintenance is a head-ache. I am utterly certain that within the next 2 years, another "life-changing" React paradigm will come into effect - can even bet on it.