I fully agree, but the amount of boilerplate is why I decided to go from "full stack" to solely backend. I want to spend my time on problems, not writing glue to piece the problems together.
Java is one of the worst when it comes to boilerplate.
Haha. I'm at a node shop -- there would actually be a lot of boilerplate to write if I was working on features, but right now my job is to write code that reduces boilerplate for other engineers, which is one of my favorite things to do. e.g. When someone starts writing a new route, they have a helper function that provides their error client, logger, hooks everything into our server automatically, etc. Right now it's a much more manual process.
To be fair, I think most redux tutorials out there suck and they often show you how to work with 4 other libraries at the same time. Redux itself is really really simple, it's more wrapping your head around the concepts than the code.
Amen to that. I actually think Vuex makes so much more sense than redux. Redux to me always feels insanely verbose. And then how you have to tie it together feels just as strange.
Redux makes complicated state possible to reason about. It does this at the cost of boilerplate, indirection and an awkward approach to async. I think I've only ever seen one Redux project actually justify these costs, and that was the article editing suite we wrote for reporters at The Guardian, back in 2015.
All the rest have been fairly trivial apps that could use React setState or possibly no client state at all.
That's the way I went for my most recent React apps, and only leaning on React Contexts for some stuff like user info and error handling that was needed in disparate components. I think a lot of people reach for Redux too quickly; it's definitely overkill for most projects I've seen it used in. Half the time, I'm happy to write my own state machine to do Reduxy things, just because I think Redux is over-engineering a lot of the time. That said, I won't write it off completely because I can definitely see the usecase for sufficiently complicated apps.
Redux documentation (at least 1 year ago), was very complex and pompous. They should learn from Vue.js to give a better simpler documentation. Also it is full of boilerplate BS. Happy to no longer work with React or ReactNative Bs.
I haven't gotten much out of TypeScript to be honest. It's kind of a bolted-on type system that requires a fair amount of discipline from all developers involved. I've gotten a lot more out of the full-fledged type systems in ReasonML and Purescript, but of course they both have bigger learning curves and more upfront cost than TypeScript. JS is fine for most things... except when it isn't, and then I really miss having a real type system.
I could never get over the boilerplate after having tried re-frame for clojurescript. It's more or less the same philosophy, but you get all the same benefits with much, much less boilerplate and end up with something that feels much easier to reason about / hold in your head.
60
u/LyeInYourEye Jun 20 '18
I love redux. I don't see what the problem is. Take a week and learn it? It seems to make sense to me.