Why does scrolling get stuck after the 5th item in a long array on Vite, but not on CRA?(“react”: “^18.3.0” on both)

“I have an array with an average of 20 items displayed in my React application. When running the application with Vite, I encounter an issue where scrolling gets stuck after the 5th item for a fraction of a second. However, when I use Create React App (CRA), the scrolling works smoothly without any issues.

I’ve ensured that the same code is used in both projects, and there are no errors or warnings in the browser console. I’ve also checked for compatibility issues with dependencies and reviewed the Vite configuration, but I haven’t been able to identify the cause of the problem.

Has anyone else encountered similar scrolling issues with Vite, particularly when rendering a long array in a carousel component? Any insights or suggestions on how to troubleshoot and resolve this issue would be greatly appreciated. Thank you!”