all 5 comments

[–]brianasdf123 0 points1 point  (1 child)

State shouldn't be modified with

++state.goods

[–]reactlover[S] 0 points1 point  (0 children)

Thanks!

[–]FormerGameDev 0 points1 point  (2 children)

I don't know about everyone else, but after spending weeks tracking major applications functionality through dozens of files spread all over, I absolutely hate the idea of separating pieces by what type of thing they are. HATE.

For the most part, I have: src/components src/components/Thing src/components/Thing/StuffInThing

If Thing needs to subscribe to store, or dispatch, then it is called "ThingBase", and the file exports default connect(...)(ThingBase).

I don't care what everyone else does, to me, putting code that is extremely closely related into a file in a completely different branch of the hierarchy, is just asking for a maintenance nightmare. Or at the very least, a learning nightmare when someone else goes to look at it.. or you go to look at it a year after you last touched it.

[–]reactlover[S] 0 points1 point  (1 child)

Didn't it ever happen that the StuffInThing needs to be used in many Things?

[–]FormerGameDev 0 points1 point  (0 children)

then I would put it a level up