News for hackers. Stuff that matters.
Re:React v15.6.0 Released by ngsayjoe on Wednesday June 14, 2017 @03:54AM (#14551270)
I don't use Redux for my website @ https://www.land.plus/ all states are managed locally in the component's instance variable. In some cases a global variable is used within the component file if single page persistency is needed. For inter-components state, i use Javascript CustomEvent & addEventListener instead. Am i doing something wrong for not using Redux?
Re:React v15.6.0 Released by wry_discontent on Wednesday June 14, 2017 @11:57AM (#14553621)
THe problem I've found with this approach is that it gets very messy very fast. It's hard to track down bugs to their source.

One of my favorite aspects of Redux is how easy it is to follow the flow of data. Whatever you do, you start at a dom element, look at what action creator it calls, and check out the changes in the reducer.

Re:React v15.6.0 Released by ngsayjoe on Wednesday June 14, 2017 @12:12PM (#14553720)
Yes, agree it is a bit messy now but still manageable as i wanna delay using Redux / Mobx as long as possible.
Re:React v15.6.0 Released by wry_discontent on Wednesday June 14, 2017 @04:40PM (#14555941)
I've also delayed introducing Redux to a project before, and it was a mistake. After a few weeks of convincing, I got time to add Redux to a project, and it's immensely difficult because of how much needs to be restructured. It's better to just start with it if you're going to end up creating something large enough or complicated enough to warrant it.
Re:React v15.6.0 Released by acemarke on Wednesday June 14, 2017 @05:42PM (#14556333)
In theory, if you've been following a "container component"-type approach, you _should_ be able to start replacing those hand-written containers with Redux-connected ones.

What kinds of issues and restructuring problems did you experience?

Re:React v15.6.0 Released by acemarke on Wednesday June 14, 2017 @11:10AM (#14553301)
No, that's not "wrong". But, it does sound like the kind of case where Redux might be useful.
Re:React v15.6.0 Released by ngsayjoe on Wednesday June 14, 2017 @12:15PM (#14553742)
Yeah, that's why i suspect it might be a a good use case for Redux but not very sure. Hopefully something better (Mobx, etc.) comes along when i decide to implement a state manager.
Re:React v15.6.0 Released by adt2bt on Wednesday June 14, 2017 @11:58AM (#14553626)
Well your site works, doesn't it? Can't do something wrong if your site is all right.
Re:React v15.6.0 Released by ngsayjoe on Wednesday June 14, 2017 @12:13PM (#14553730)
Compared to my JQuery days, it is a big improvement in terms of maintainability now. No complaints!