Hacker News new | ask | show | jobs
by rejschaap 3446 days ago
I don't think it is a good idea to drag Redux and Flux into the discussion when someone asks a basic question about React.
1 comments

I think that depends, many would argue that a flux implementation is an easier way to reason about the problem set, thus their existence. Making someone aware that this is what flux implementation where designed (in part) to address, allows them to see the full scope of possible ways to accomplish their goal. I see nothing wrong with saying "hey that is why these guys built this library".

He was asking for best practices, certainly a sizable amount of developers would argue to use a flux implementation for that particular problem, as a best practice.

Still, you start with the basics, too many people are scared away from React because when someone asks a basic question about React, the answer typically goes something like this "oh, you better use Redux/Immutablejs/Redux-Saga/Babel/Webpack/etc". Usually without even addressing the actual problem.

In this particular case it would be totally OK if the answer included Redux. Because, like you said, it is relevant. But it should go something like "Pass event handlers from parent to child component. If you find a lot of components are merely passing through a lot of data and event handlers to child components without using it you should have a look at Redux".

You should have a look at acemarke's response and neurostimulants follow-up, together they answered this question perfectly.