Initial Params in React Native
Hello,
I have a Rive file with 7 geometric shapes that morph into each other using a single slider input. The default shape is #4.
In my React Native app, I want to start the animation from any shape. For example, I’d like to initially show shape #7 and then morph to #1.
Because of how React Native works, I render the <Rive /> component and then, in a useEffect, I set the slider value to 7. The problem is that it’s not fast enough: for ~100–200 ms the default shape (#4) is visible before it switches to #7.
Is there a way to set / bind the initial slider value (shape number) before the Rive component is actually displayed, so that the first frame is already on shape #7?
I’d prefer not to temporarily hide the component and show it after a timeout, because I don’t want to rely on hardcoded delays.
I am using “rive-react-native”: 9.7.0
Thank you!