Remix.run Logo
slopinthebag 8 hours ago

> I’ll focus on React and Redux in some of my examples since that is what I have the most experience with, but much of this applies to other frameworks and to JS-heavy approaches in general.

That's not a fair assumption. Frameworks like Svelte, Solid, Vue etc have smaller bundle sizes and rendering speeds that approach the baseline vanilla-js cost.

I'm all for criticising Javascript, but moving everything to the server isn't a real solution either. Instead of slow React renders (50ms?), every interaction is a client-server round trip. The user pays the cost of the paradigm on each interaction instead of upfront with an initial JS payload. Etc.

carshodev 6 hours ago | parent | next [-]

Yeah this article is only about React. But it makes sense that someone would think this way because many dev's think JS web apps==react only.

The problem is react is "good enough" for most cases and the performance degradations happen slow enough that the devs/project leads don't see it until it's too late and they are already overly invested in there project and switching would be too compliated/costly for them.

Svelte/kit and properly optimized packages solve almost all of the "problems" this article tries to bring up.

slopinthebag 18 minutes ago | parent [-]

To be fair though, even with Svelte et al bundle sizes can balloon quickly when using UI toolkits and other libraries.

mosdl 7 hours ago | parent | prev [-]

Plus Redux is horrible for performance, slows things down and overcomplicates everything.

Rohansi 5 hours ago | parent [-]

I never understood why state management is overcomplicated in React. For some reason most people use something like Redux which has a very unintuitive API. There are other state management packages available that are so much easier to use and understand, like MobX.

https://github.com/mobxjs/mobx

slopinthebag 20 minutes ago | parent | next [-]

Redux is an implementation of the elm architecture (Tea) which is used for UI state in a lot of languages and frameworks. JS/TS is just not a very ergonomic language for it so it becomes painful quickly.

https://guide.elm-lang.org/architecture/

littlecranky67 3 hours ago | parent | prev | next [-]

To shine a light on the mystery, before React had (a) hooks and (b) a stable context API and (c) tanstack-query/react-query or GraphQL - state handling WAS a mess. Thats when redux/mobx etc. made more sense. Try to build something with a pre-2019 version of react and you will understand the need.

epolanski 2 minutes ago | parent | prev [-]

Is this 2019?