In development mode, React’s strict mode can cause certain effects to run twice to help identify side effects. If this is the cause, it won't affect production builds. You can temporarily remove React.StrictMode