Skip to content

Commit

Permalink
update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
bodymovin committed May 28, 2024
1 parent 8be1f0d commit a92592d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/hooks/useRiveFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import { EventType, RiveFile } from '@rive-app/canvas';
* It sets up a RiveFile based on provided source parameters (URL or ArrayBuffer) and ensures
* proper cleanup to avoid memory leaks when the component unmounts or inputs change.
*
* @param params - Object containing parameters accepted by the Rive file in the rive-js runtime,
* @param params - Object containing parameters accepted by the Rive file in the @rive-app/canvas runtime,
*
* @returns {RiveFile} Contains the active RiveFile instance (`riveFile`).
* @returns {RiveFileState} Contains the active RiveFile instance (`riveFile`) and the loading status.
*/
function useRiveFile(params: UseRiveFileParameters): RiveFileState {
const [riveFile, setRiveFile] = useState<RiveFile | null>(null);
Expand Down Expand Up @@ -42,7 +42,7 @@ function useRiveFile(params: UseRiveFileParameters): RiveFileState {
loadRiveFile();

return () => {
file?.cleanup();
file?.cleanup();
};
}, [params.src, params.buffer]);

Expand Down

0 comments on commit a92592d

Please sign in to comment.