negomi / react-burger-menu

:hamburger: An off-canvas sidebar component with a collection of effects and styles using CSS transitions and SVG path animations
http://negomi.github.io/react-burger-menu/
MIT License
5.04k stars 582 forks source link

Animations broken when 'right' side menu #499

Open cardanoeconews opened 1 year ago

cardanoeconews commented 1 year ago

Really need the right side menu to animate out (like the left) vs pop out instantly.

Has anyone fixed this issue?

If not, perhaps someone can point me to where I can try and fork / fix it myself?

cardanoeconews commented 1 year ago

the problem seems to arise when using the context provider pattern provided in the docs, and when using scaleRotate or pushRotate

andyfry01 commented 10 months ago

I've had this problem while implementing the component according to the README as well.

You interestingly don't see this same issue in the project homepage, so I think this is an unaddressed bug within the component itself which has been solved with a little setTimeout hack in the docs and examples.

If you wrap your call to setState with a little timeout like in this example, then everything animates smoothly.