rive-app / rive-app/rive-react

Issue: Re-mount RiveComponent multiple times cause web page laggy

Open
#400 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1.2k
Forks
58
Avg merge
3h 23m
Merged PRs (30d)
6

Description

Steps to reproduce
  1. I use https://rive.app/marketplace/24941-46557-expression-grid/
  2. I have a Home page and a child page mount the RiveComponent
  3. then i enter & leave child page 10 times with react router
  4. entire page start laggy
const Animation = () => {
   const { RiveComponent } = useRive({ src: './expression-grid.riv' })
   return <RiveComponent />
}

Is there any possible WebGL context leaks?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the report with the useRive hook and RiveComponent while repeatedly navigating with React Router between the Home and child pages. Inspect the mount and unmount lifecycle for the WebGL context leak suggested in the issue. Done means repeated mounts no longer make the page laggy and the behavior is covered by a suitable regression check.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.