Compare commits

...

35 Commits

Author SHA1 Message Date
bodymovin
4914770c70 chore: release 4.18.8 2025-04-16 23:37:08 +00:00
Hernan Torrisi
21e457bda4 rive canvas 2.27.0 2025-04-16 16:30:10 -07:00
susan101566
cc0e91689b chore: release 4.18.7 2025-04-09 18:16:01 +00:00
Susan Wang
8244982000 update to 2.26.8 2025-04-09 12:09:58 -06:00
HayesGordon
439b413782 chore: release 4.18.6 2025-04-03 13:02:07 +00:00
CI
9ab4e378fc chore: bump rive web to 2.26.7 2025-04-03 14:58:32 +02:00
bodymovin
9061a93978 chore: release 4.18.5 2025-03-28 05:48:05 +00:00
Hernan Torrisi
88d1bc000c update to 2.26.6 2025-03-27 22:43:52 -07:00
bodymovin
9b1d3825f8 chore: release 4.18.4 2025-03-24 17:11:49 +00:00
Hernan Torrisi
277f4d7db0 update rive canvas to 2.26.5 2025-03-24 10:01:16 -07:00
bodymovin
e68ca963a9 chore: release 4.18.3 2025-02-28 01:37:00 +00:00
Hernan Torrisi
d820cdf6f1 update rive to 2.26.4 2025-02-27 17:31:48 -08:00
HayesGordon
c9a4dc0b5c chore: release 4.18.2 2025-02-17 11:19:33 +00:00
CI
19b58f5eb6 chore: update rive to 2.26.3 2025-02-17 12:14:25 +01:00
bodymovin
6263449898 chore: release 4.18.1 2025-02-15 01:07:50 +00:00
Hernan Torrisi
630f70a81d update rive to 2.26.2 2025-02-14 17:02:23 -08:00
bodymovin
bbd0d08fed chore: release 4.18.0 2025-02-11 20:20:14 +00:00
Hernan Torrisi
ef23793d26 update rive to 2.26.1 2025-02-11 11:49:47 -08:00
Hernan Torrisi
ca10584ed4 cleanup instance if use effect reruns and instance is not loaded 2025-02-04 07:43:18 -08:00
damzobridge
6fe765df84 chore: release 4.17.10 2025-01-27 23:34:24 +00:00
Chukwuma Okere
c62b80af09 chore: add React 19 support to package.json 2025-01-27 14:47:04 -08:00
bodymovin
777337c481 chore: release 4.17.9 2025-01-27 16:22:26 +00:00
Hernan Torrisi
da4b5978e7 update rive to 2.25.7 2025-01-27 08:17:38 -08:00
bodymovin
09c0d1f947 chore: release 4.17.8 2025-01-24 21:08:47 +00:00
Hernan Torrisi
0ca5933c41 update rive to 2.25.6 2025-01-24 13:03:56 -08:00
bodymovin
f272fd92f0 chore: release 4.17.7 2025-01-23 23:46:21 +00:00
CI
192a562764 chore: bump wasm to 2.25.5 2025-01-23 20:43:34 +02:00
bodymovin
224a768737 chore: release 4.17.6 2025-01-14 14:58:56 +00:00
Hernan Torrisi
c085bd5ea3 update rive to 2.25.4 2025-01-13 19:38:53 -08:00
bodymovin
bb13c71982 chore: release 4.17.5 2024-12-24 18:55:30 +00:00
Hernan Torrisi
779e06583c bump rive canvas to 2.25.3 2024-12-24 10:47:44 -08:00
bodymovin
e172e0f210 chore: release 4.17.4 2024-12-17 19:51:56 +00:00
Hernan Torrisi
abbcf14b70 rive canvas 2.25.2 2024-12-17 11:42:28 -08:00
bodymovin
a0885648ce chore: release 4.17.3 2024-12-13 04:18:27 +00:00
Hernan Torrisi
9f768bdd0c rive canvas 2.25.1 2024-12-12 20:09:59 -08:00
7 changed files with 148 additions and 20 deletions

View File

@@ -4,8 +4,128 @@ All notable changes to this project will be documented in this file. Dates are d
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
#### [v4.18.8](https://github.com/rive-app/rive-react/compare/v4.18.7...v4.18.8)
- rive canvas 2.27.0 [`21e457b`](https://github.com/rive-app/rive-react/commit/21e457bda4bc3c09a0b866bcef062d8172d71105)
#### [v4.18.7](https://github.com/rive-app/rive-react/compare/v4.18.6...v4.18.7)
> 9 April 2025
- chore: release 4.18.7 [`cc0e916`](https://github.com/rive-app/rive-react/commit/cc0e91689b071569ae28728cc8dcab7e400926b3)
- update to 2.26.8 [`8244982`](https://github.com/rive-app/rive-react/commit/82449820004e25b58684db5548183cde4eb59154)
#### [v4.18.6](https://github.com/rive-app/rive-react/compare/v4.18.5...v4.18.6)
> 3 April 2025
- chore: release 4.18.6 [`439b413`](https://github.com/rive-app/rive-react/commit/439b4137828b5be2f945e0f396309fadb78a27c7)
- chore: bump rive web to 2.26.7 [`9ab4e37`](https://github.com/rive-app/rive-react/commit/9ab4e378fc31f462e7c4f3d5317e4ac631b2e386)
#### [v4.18.5](https://github.com/rive-app/rive-react/compare/v4.18.4...v4.18.5)
> 28 March 2025
- chore: release 4.18.5 [`9061a93`](https://github.com/rive-app/rive-react/commit/9061a93978cf482b25bdbedbbb053266687a9ee3)
- update to 2.26.6 [`88d1bc0`](https://github.com/rive-app/rive-react/commit/88d1bc000cd5a8b20edf483a99c8c9b6b8ed28e4)
#### [v4.18.4](https://github.com/rive-app/rive-react/compare/v4.18.3...v4.18.4)
> 24 March 2025
- chore: release 4.18.4 [`9b1d382`](https://github.com/rive-app/rive-react/commit/9b1d3825f890bf8c82985073d50d67da95f9d727)
- update rive canvas to 2.26.5 [`277f4d7`](https://github.com/rive-app/rive-react/commit/277f4d7db0ff0b873c2b10750affa97a9d29cbd3)
#### [v4.18.3](https://github.com/rive-app/rive-react/compare/v4.18.2...v4.18.3)
> 28 February 2025
- chore: release 4.18.3 [`e68ca96`](https://github.com/rive-app/rive-react/commit/e68ca963a93e779104c032ceb055c141f1a565eb)
- update rive to 2.26.4 [`d820cdf`](https://github.com/rive-app/rive-react/commit/d820cdf6f13c53b519080ecd0438f222b9eda764)
#### [v4.18.2](https://github.com/rive-app/rive-react/compare/v4.18.1...v4.18.2)
> 17 February 2025
- chore: release 4.18.2 [`c9a4dc0`](https://github.com/rive-app/rive-react/commit/c9a4dc0b5cafd7696414ff99ae3add7bd852d0a7)
- chore: update rive to 2.26.3 [`19b58f5`](https://github.com/rive-app/rive-react/commit/19b58f5eb6d215a92019b69d1c1a182e1b582af0)
#### [v4.18.1](https://github.com/rive-app/rive-react/compare/v4.18.0...v4.18.1)
> 15 February 2025
- chore: release 4.18.1 [`6263449`](https://github.com/rive-app/rive-react/commit/6263449898abdb77f4a08e92f186e61f9ec4cea8)
- update rive to 2.26.2 [`630f70a`](https://github.com/rive-app/rive-react/commit/630f70a81dbf5292fc339163f3367b53adfb5e65)
#### [v4.18.0](https://github.com/rive-app/rive-react/compare/v4.17.10...v4.18.0)
> 11 February 2025
- chore: release 4.18.0 [`bbd0d08`](https://github.com/rive-app/rive-react/commit/bbd0d08fed0c3f3e5efd04f178e7a380951616ab)
- cleanup instance if use effect reruns and instance is not loaded [`ca10584`](https://github.com/rive-app/rive-react/commit/ca10584ed422be62e9eea2b7d05007cd2abd3870)
- update rive to 2.26.1 [`ef23793`](https://github.com/rive-app/rive-react/commit/ef23793d2629dee2eb448d0c825a3e7cdfb675d9)
#### [v4.17.10](https://github.com/rive-app/rive-react/compare/v4.17.9...v4.17.10)
> 27 January 2025
- chore: release 4.17.10 [`6fe765d`](https://github.com/rive-app/rive-react/commit/6fe765df84e996611b8878155ba0078ee9caff78)
- chore: add React 19 support to package.json [`c62b80a`](https://github.com/rive-app/rive-react/commit/c62b80af09a3b42407dac8d9c63cd0e070738d82)
#### [v4.17.9](https://github.com/rive-app/rive-react/compare/v4.17.8...v4.17.9)
> 27 January 2025
- chore: release 4.17.9 [`777337c`](https://github.com/rive-app/rive-react/commit/777337c4814ecc16f09a7971f3fabccc4be48b33)
- update rive to 2.25.7 [`da4b597`](https://github.com/rive-app/rive-react/commit/da4b5978e7a558bba0d10ca18ef3053deac88691)
#### [v4.17.8](https://github.com/rive-app/rive-react/compare/v4.17.7...v4.17.8)
> 24 January 2025
- chore: release 4.17.8 [`09c0d1f`](https://github.com/rive-app/rive-react/commit/09c0d1f94723f09faf06d0e17c19f322f0e2a1c2)
- update rive to 2.25.6 [`0ca5933`](https://github.com/rive-app/rive-react/commit/0ca5933c411b1a733b35dd785a7bfcdba569b8c5)
#### [v4.17.7](https://github.com/rive-app/rive-react/compare/v4.17.6...v4.17.7)
> 23 January 2025
- chore: release 4.17.7 [`f272fd9`](https://github.com/rive-app/rive-react/commit/f272fd92f0030016b691923f8c61d1ae56182e82)
- chore: bump wasm to 2.25.5 [`192a562`](https://github.com/rive-app/rive-react/commit/192a562764d1cb906d14e2f8f3d6fed3cfa5f039)
#### [v4.17.6](https://github.com/rive-app/rive-react/compare/v4.17.5...v4.17.6)
> 14 January 2025
- chore: release 4.17.6 [`224a768`](https://github.com/rive-app/rive-react/commit/224a7687373bfc8ef05bfb4604f5b1e2be9e4cdd)
- update rive to 2.25.4 [`c085bd5`](https://github.com/rive-app/rive-react/commit/c085bd5ea3c811a5934c725d3347baf723b11225)
#### [v4.17.5](https://github.com/rive-app/rive-react/compare/v4.17.4...v4.17.5)
> 24 December 2024
- chore: release 4.17.5 [`bb13c71`](https://github.com/rive-app/rive-react/commit/bb13c719828b2c5c27b524f0e79b5f7ad3896618)
- bump rive canvas to 2.25.3 [`779e065`](https://github.com/rive-app/rive-react/commit/779e06583ceb853621693d0e0c056537c90998b9)
#### [v4.17.4](https://github.com/rive-app/rive-react/compare/v4.17.3...v4.17.4)
> 17 December 2024
- chore: release 4.17.4 [`e172e0f`](https://github.com/rive-app/rive-react/commit/e172e0f21092a3c4dd9cf528aa71684dc07b3fa7)
- rive canvas 2.25.2 [`abbcf14`](https://github.com/rive-app/rive-react/commit/abbcf14b706fedb8aed1c291b0d35b225206eed8)
#### [v4.17.3](https://github.com/rive-app/rive-react/compare/v4.17.2...v4.17.3)
> 13 December 2024
- chore: release 4.17.3 [`a088564`](https://github.com/rive-app/rive-react/commit/a0885648ceb4d833c1467fd10d36641fc5f79450)
- rive canvas 2.25.1 [`9f768bd`](https://github.com/rive-app/rive-react/commit/9f768bdd0ca07aedec7f67405223b44bcf7380d7)
#### [v4.17.2](https://github.com/rive-app/rive-react/compare/v4.17.1...v4.17.2)
> 11 December 2024
- chore: release 4.17.2 [`94c9a2a`](https://github.com/rive-app/rive-react/commit/94c9a2a60b89244e0a36eb9324e500616a31e970)
- rive canvas 2.25.0 [`dfe0d10`](https://github.com/rive-app/rive-react/commit/dfe0d109368abe8ebadf8dabc80d05116242c301)
#### [v4.17.1](https://github.com/rive-app/rive-react/compare/v4.17.0...v4.17.1)

View File

@@ -1,6 +1,6 @@
{
"name": "@rive-app/react-canvas-lite",
"version": "4.17.2",
"version": "4.18.8",
"description": "React wrapper around the @rive-app/canvas-lite library",
"main": "dist/index.js",
"typings": "dist/types/index.d.ts",
@@ -18,9 +18,9 @@
},
"homepage": "https://github.com/rive-app/rive-react#readme",
"dependencies": {
"@rive-app/canvas-lite": "2.25.0"
"@rive-app/canvas-lite": "2.27.0"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0"
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@rive-app/react-canvas",
"version": "4.17.2",
"version": "4.18.8",
"description": "React wrapper around the @rive-app/canvas library",
"main": "dist/index.js",
"typings": "dist/types/index.d.ts",
@@ -18,9 +18,9 @@
},
"homepage": "https://github.com/rive-app/rive-react#readme",
"dependencies": {
"@rive-app/canvas": "2.25.0"
"@rive-app/canvas": "2.27.0"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0"
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@rive-app/react-webgl",
"version": "4.17.2",
"version": "4.18.8",
"description": "React wrapper around the @rive-app/webgl library",
"main": "dist/index.js",
"typings": "dist/types/index.d.ts",
@@ -18,9 +18,9 @@
},
"homepage": "https://github.com/rive-app/rive-react#readme",
"dependencies": {
"@rive-app/webgl": "2.25.0"
"@rive-app/webgl": "2.27.0"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0"
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@rive-app/react-webgl2",
"version": "4.17.2",
"version": "4.18.8",
"description": "React wrapper around the @rive-app/webgl2 library",
"main": "dist/index.js",
"typings": "dist/types/index.d.ts",
@@ -18,9 +18,9 @@
},
"homepage": "https://github.com/rive-app/rive-react#readme",
"dependencies": {
"@rive-app/webgl2": "2.25.0"
"@rive-app/webgl2": "2.27.0"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0"
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "rive-react",
"version": "4.17.2",
"version": "4.18.8",
"description": "React wrapper around the rive-js library",
"main": "dist/index.js",
"typings": "dist/types/index.d.ts",
@@ -36,13 +36,13 @@
},
"homepage": "https://github.com/rive-app/rive-react#readme",
"dependencies": {
"@rive-app/canvas": "2.25.0",
"@rive-app/canvas-lite": "2.25.0",
"@rive-app/webgl": "2.25.0",
"@rive-app/webgl2": "2.25.0"
"@rive-app/canvas": "2.27.0",
"@rive-app/canvas-lite": "2.27.0",
"@rive-app/webgl": "2.27.0",
"@rive-app/webgl2": "2.27.0"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0"
},
"devDependencies": {
"@babel/core": "^7.18.0",

View File

@@ -126,24 +126,32 @@ export default function useRive(
if (!canvasElem || !riveParams) {
return;
}
let isLoaded = rive != null;
let r: Rive | null;
if (rive == null) {
const { useOffscreenRenderer } = options;
const r = new Rive({
r = new Rive({
useOffscreenRenderer,
...riveParams,
canvas: canvasElem,
});
r.on(EventType.Load, () => {
isLoaded = true;
// Check if the component/canvas is mounted before setting state to avoid setState
// on an unmounted component in some rare cases
if (canvasElem) {
setRive(r);
} else {
// If unmounted, cleanup the rive object immediately
r.cleanup();
r!.cleanup();
}
});
}
return () => {
if(!isLoaded) {
r?.cleanup();
}
}
}, [canvasElem, isParamsLoaded, rive]);
/**
* Ref callback called when the container element mounts