79165347

Date: 2024-11-07 07:11:25
Score: 2
Natty:
Report link

You need to wrap component you need to animate into another block and make wrapper's height 0. After that, on mount, you can get height of your children, from ref, for example, and animate wrapper's height to the children height size.

https://codesandbox.io/p/sandbox/zealous-water-5r8dzc

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Vadym Lohvynovych