rive-app / rive-react

React runtime for Rive

Home Page:https://rive-app.github.io/rive-react

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

animations change don't work correctly

Kassan424kh opened this issue · comments

Hello Rive,

after i change the state in the animations attribute, the animation can no longer be displayed.

rive-react is use 1.0.4

import "./styles.sass";
import Rive from "rive-react";

const LoadingAnimation = ({ dark }) => {
    return (
        <Rive
            className="loading-animation"
            src={`/rive/loadinganimation.riv`}
            autoPlay
            useOffscreenRenderer={false}
            animations={dark ? "dark" : "light"}
        />
    );
};

export default LoadingAnimation;

image

closest to #65

Hey @Kassan424kh, I'm not able to reproduce your issue. When I try with my own example it's working fine. Would you be able to share the .riv file where you are seeing this happen?

Hey @avivian,

hmm weird 🤔.
here's the file
export.zip

@Kassan424kh We've had some updates since - I'm looking at the codesandbox which seems to be using an updated version, and am not able to see the animation disappearing. Do you still see the issue on your end?

Hi @zplata,
Sorry i fixed the showing animation problem, but i still has the same problem with changing animation after state change it still not working.