3 ms·
Neat! p.s. On the "click me" demo, the state is preserved when going back then forward, but not preserved when going forward then back. - Is that a design deci
by eterm 11y ago
Neat!
p.s. On the "click me" demo, the state is preserved when going back then forward, but not preserved when going forward then back. - Is that a design decision or unintended effect?
- thekenwheeler 11y agoI believe its due to the mount cycle of TransitionGroup. Especially if you navigate before a transition is over, then an unmount doesn't occur, and the state isn't cleared.
- judofyr 11y agoFor me it's only preserved if I press left-right or right-left quickly. I'm guessing it's intentional. It would be nice if it kept the state though.
- thekenwheeler 11y agoThe component in question is using component local state, so that resets on mount/unmount. That said, it would be very easy to embed one that instead used flux, and state would be preserved.