Skip to content

Commit 91a4d2b

Browse files
committed
fix: restore RiveView JSDoc, remove unnecessary comment
1 parent dbfe54c commit 91a4d2b

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

ios/ReferencedAssetLoader.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ func createAssetFileError(_ assetName: String) -> NitroRiveError {
1111
}
1212

1313
final 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

src/core/RiveView.tsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,22 @@ export interface RiveViewProps
1212
const 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+
*/
1531
export function RiveView(props: RiveViewProps) {
1632
const { onError, hybridRef: userHybridRef, ...rest } = props;
1733
const wrappedOnError = onError ?? defaultOnError;

0 commit comments

Comments
 (0)