You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: eagerly dispose RiveView and break referenced asset retain cycle
RiveView now calls dispose() on the native HybridObject when the React
component unmounts, freeing the RiveView, ViewModel, and C++ scene graph
immediately instead of waiting for Hermes GC.
Also removes the withExtendedLifetime(fileRef) retain cycle in
ReferencedAssetLoader that kept RiveFile alive permanently through the
LoadAsset closure stored on the file itself.
* RiveView is a React Native component that renders Rive graphics.
15
-
* It provides a seamless way to display and control Rive graphics in your app.
16
-
*
17
-
* @example
18
-
* ```tsx
19
-
* <RiveView
20
-
* file={riveFile}
21
-
* artboardName="New Artboard"
22
-
* stateMachineName="State Machine 1"
23
-
* autoPlay={true}
24
-
* fit={Fit.Contain}
25
-
* style={styles.riveContainer}
26
-
* />
27
-
* ```
28
-
*
29
-
* @property {RiveFile} file - The Rive file to be displayed
30
-
* @property {string} [artboardName] - Name of the artboard to display from the Rive file
31
-
* @property {string} [stateMachineName] - Name of the state machine to play
32
-
* @property {ViewModelInstance | DataBindMode | DataBindByName} [dataBind] - Data binding configuration for the state machine, defaults to DataBindMode.Auto
33
-
* @property {boolean} [autoPlay=true] - Whether to automatically start playing the state machine
34
-
* @property {Alignment} [alignment] - How the Rive graphic should be aligned within its container
35
-
* @property {Fit} [fit] - How the Rive graphic should fit within its container
0 commit comments