react-scrollmagic icon indicating copy to clipboard operation
react-scrollmagic copied to clipboard

On component unmount, the controller is not destroyed.

Open billvog opened this issue 9 months ago • 0 comments

The bug

When creating a new React application with Vite's React template, it comes with StrictMode enabled.

StrictMode, mounts the component, then unmounts it and then mounts it again. It does that to check for errors.

That created a problem, where I had one controller in my JSX structure but because of the mount-unmount-mount situation I ended it up with two. That caused a number of problems down the line.

billvog avatar May 21 '24 18:05 billvog