React-spring: AnimatedValue Memory Leak

Created on 21 May 2019  路  5Comments  路  Source: pmndrs/react-spring

馃悰 Bug Report

AnimatedValues are being created but not deleted when using nextjs and SSR.

https://spectrum.chat/react-spring/general/animated-component-is-causing-memory-leak~1190af03-e0c9-4e6d-9d07-1419581424a2 may be relevant.

To Reproduce

Create an AnimatedValue (animated.div) server-side using nextjs.

Expected behavior

The AnimatedValues are properly cleaned up.

Environment

  • react-spring ^v8.0.18
  • react ^v16.8.0

react-spring memory leak

SSR bug

Most helpful comment

Hi,
is it possible that you still fix this bug in v8? We also have this problem and cannot update to v9beta due to other bugs.

All 5 comments

The same seems to happen with useTransition. Left a Next.js site with a useTransition carousel (that switches slides every 8 seconds) open overnight, Chrome stopped the site due to out-of-memory exception.

See this image: https://d.pr/i/PO1PYy

This is happening to me also.

Please try with react-spring@next. 馃憤

If that doesn't work, run @react-spring/envinfo and create a gist with the output like this.
Then paste that link here. Thanks!

Hello there,
We have the same issue here. react-spring@next fixed it and I did not see any regression (yet).

Thanks @aleclarson

Hi,
is it possible that you still fix this bug in v8? We also have this problem and cannot update to v9beta due to other bugs.

Was this page helpful?
0 / 5 - 0 ratings