Live data from Hacker News

React and Redux are a joke right?

games.greggman.com

1–10 of 119 posts

Re: React and Redux are a joke right?

#2
If the author wishes to continue with js/react/redux then he needs to pick up a library like immutable.js to cut down that immutabiilty helper crap.

However, there is a better way ... lein new figwheel my-app, clojurescript+reframe gives you all the benefits of redux with an order of magnitude less boilerplate (also hot reloading and immutability by default without no extra setup or ceremony)

Re: React and Redux are a joke right?

#3
Stopped reading half-way through, as lots of incorrect stuff off the bat.

> In the react world though you can’t mutate your data

Sure you can.

> If you get 3 people react will end up re-rendering 3 times because of the code above. Each call to `setState` triggers a re-render.

Nope, calls to setState are batched.

Re: React and Redux are a joke right?

#5

If the author wishes to continue with js/react/redux then he needs to pick up a library like immutable.js to cut down that immutabiilty helper crap. However, there is a better way ... lein new figwheel my-app, clojurescript+reframe gives you all the benefits of redux with an order of magnitude less boilerplate (also hot reloading and immutability by default without no extra setup or ceremony)

Immutable.js is just another complication with another 60k size penalty with a few new negative drawbacks that he would need more complexity to solve. Author is already arguing against this approach.

Re: React and Redux are a joke right?

#6
Without a big push in uniforming and standardizing ways to listen to property changes on both objects and components there won't ever be a sane UI framework in javascript, it's simple as that.

They'll either be too limited so that you cannot express the full featureset of html within their bindings without hacks or too convoluted to use and impossible to debug.

Re: React and Redux are a joke right?

#7
post #3

Stopped reading half-way through, as lots of incorrect stuff off the bat. > In the react world though you can’t mutate your data Sure you can. > If you get 3 people react will end up re-rendering 3 times because of the code above. Each call to `setState` triggers a re-render. Nope, calls to setState are batched.

I think sometimes you need an outsider view to call out that the emperor isn't wearing any clothes, and that's going to result in botched details. I don't think it impacts the overall point the author is trying to make.

I teach web development at a part-time course, and we recently redesigned our curriculum to use React + Node instead of Rails with JQuery. With the new technologies, the students are profoundly less productive or effective by the end of the course - they're doing well if they have the barest skeleton of a CRUD app up, whereas the Rails apps were all fleshed out and far more engaging.

There's something rotten with the state of development these days - we're dealing with far more complexity and being less productive for what's usually the same result.

Re: React and Redux are a joke right?

#8
Maybe this is stupid question, cause I don't know React or Redux, but why would anyone want the data structures holding page data to be immutable? Data can change any time due to user actions, immutability would only get in the way, wouldn't it?

Re: React and Redux are a joke right?

#9
post #3

Stopped reading half-way through, as lots of incorrect stuff off the bat. > In the react world though you can’t mutate your data Sure you can. > If you get 3 people react will end up re-rendering 3 times because of the code above. Each call to `setState` triggers a re-render. Nope, calls to setState are batched.

First thing that struck me as dishonest. The Facebook put a lot of thought in making sure all updates to the DOM are as scarce and optimized as possible, so naturally it batches them.
Post reply on HN