I am trying to have an animation every time the picture component gets changed. The first animation when the page loads , is fine. When I click the '+' button , the animation kind of snaps back to its final position in a jerk and is not smooth. I don't understand why this snap effect is happening. How do i fix this ?
it's easier to think of spring as a value interpolator, it doesn't do magic. if you want two elements on top of one another in css you need to position them absolutely. you can do this in plain css classes (.MainSlide in your case) or even in the spring definition, for instance from: { position: 'absolute', .... in other situations you want items to be stacked, like in a list. but everything's under your full control.
Most helpful comment
it's easier to think of spring as a value interpolator, it doesn't do magic. if you want two elements on top of one another in css you need to position them absolutely. you can do this in plain css classes (
.MainSlidein your case) or even in the spring definition, for instancefrom: { position: 'absolute', .... in other situations you want items to be stacked, like in a list. but everything's under your full control.