File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,8 +11,6 @@ func createAssetFileError(_ assetName: String) -> NitroRiveError {
1111}
1212
1313final class ReferencedAssetLoader {
14- // Keeps the RiveFile alive while asset loads are in flight, without creating a retain cycle
15- // through the LoadAsset closure stored on the file itself.
1614 private var activeLoadCount = 0
1715 private var activeFileRef : RiveFile ?
1816
Original file line number Diff line number Diff line change @@ -12,6 +12,22 @@ export interface RiveViewProps
1212const defaultOnError = ( error : RiveError ) =>
1313 console . error ( `[${ RiveErrorType [ error . type ] } ] ${ error . message } ` ) ;
1414
15+ /**
16+ * RiveView is a React Native component that renders Rive graphics.
17+ * It provides a seamless way to display and control Rive graphics in your app.
18+ *
19+ * @example
20+ * ```tsx
21+ * <RiveView
22+ * file={riveFile}
23+ * artboardName="New Artboard"
24+ * stateMachineName="State Machine 1"
25+ * autoPlay={true}
26+ * fit={Fit.Contain}
27+ * style={styles.riveContainer}
28+ * />
29+ * ```
30+ */
1531export function RiveView ( props : RiveViewProps ) {
1632 const { onError, hybridRef : userHybridRef , ...rest } = props ;
1733 const wrappedOnError = onError ?? defaultOnError ;
You can’t perform that action at this time.
0 commit comments