tylergaw / colorme

Visualize CSS Color Functions?
https://colorme.io
MIT License
316 stars 14 forks source link

Use Redux for state management #1

Closed tylergaw closed 7 years ago

tylergaw commented 7 years ago

Currently, all app state is handled in App.js. This works, but code could be cleaner by using a standard Redux pattern. Actions, reduces, dispatchin' instead of this.setState used in different methods.

abacaj commented 7 years ago

I'd like to really challenge you on this one.

Considering the amount of state being used in App.js, you will undoubtedly add unnecessary complexity to your application by adding Redux.

Your application has very simple state.

tylergaw commented 7 years ago

Thanks @abacaj good call. Was on the fence about it. Was talking with other folks about this too and they recommended not using Redux too.

Think what I may do is just try to abstract the state management "up" a bit, if that makes sense. Feels like I'm repeating myself a bit too much in App.js right now. I'm anticipating adding more functionality in the future that may increase the amount of state to manage.

Marked this as wontfix. Gonna keep it open to reference it when I do any abstraction work. Just gonna leave it as is for a while though.

tylergaw commented 7 years ago

Gonna go ahead and close this. Going to focus on adding new features and fixing UI issues before abstracting code. 👍