by williamcotton · 2y ago · 0 comments
But yes, the generalized and popular React ecosystem is a mess.
React makes it easy to create a big mess.
Because I only spent 3 years in SPA land I feel quite comfortable with only shipping what the browser needs to display what the user wants. Getting JS to render everything always felt a bit odd to me.
> making everything a reducer
just curiosity from someone whos not very experienced in react, but what are the problems with that?The thought behind this is that components live in pyramids, and state and props ideally only go down and rarely up by setters-> parents and their immediate children can easily share state and props.
This gets more complicated the larger your family line gets. Many grandchildren down, you have since passed the respective props via prop drilling through a lot of components that perhaps don't care for them. It also gets complicated if you want to share state not in an immediate family line, but in a neighborhood.
Overdoing it is almost like hoarding. You think "eh, maybe I need this later somewhere else) and suddenly, your entire application basically lives in the global store.
I think a lot of the issues with React in general has to do with attempting to contort JS into a functional language.
useContext can lead to some gnarly code.
Just don’t make me develop a production site with a dev environment that falls over due to CORS for my first semester at my fancy new job ;)
(And why do you call state management in stateless design “hooks?” And, and!)
Web components are great, let’s build a framework around them! /sarcasm probably referencing an XKCD