3 ms·
Eww... animation details in my state? Why?
by gibbitz 10y ago
Eww... animation details in my state? Why?
- tannerlinsley 10y agoKeep in mind, this is not a replacement for class css transitions, but stylesheets can only go so far. It may feel a bit funny at first, but it truly opens up new possibilities that were not previously possible with simple css animations. The most obvious being state-dependent dynamic styles. And since you can animate any value you want (not just styles), the applications are only as limited as your imagination! Cheers! :)
- lobster_johnson 10y agoNot sure what you're referring to here. React state is UI state. Components are of course visual (the "V" in MVC), and component state is what you use for UI state. So there's no separation of concerns being violated, unless you believe in a strict separation of style and component, which I think is a fallacy. Animation stuff in Redux state would not be as nice.