Hacker News new | past | comments | ask | show | jobs | submit login

I'm not religious about keeping components stateless. I have some components where I just found it was getting too complex to keep bouncing the state up and down the hierarchy so I just merged it all into one big stateful component.

If I was a better programmer I probably would have known how to structure it properly to avoid this but I'm not.

Also recently I have gone to the trouble of learning Redux which effectively provides a mechanism for global state and probably that would remove much of the problem with moving state around. But this is the thing about programming - you build your code doing it one way, and 80% into your project find a better way, which you start using. Hmmmm.... now should I get the damn thing built and have the app use two (or more) ways of getting the same thing done, or go back and make the whole app consistently use the better way, or not use the better way and instead continue to use the old way but keep things consistent?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: