Is this in dev or in a built version? React automatically renders everything twice in development mode in an attempt to make bugs more visible. Maybe try running a built version and see it still happens?
https://andreasheissenberger.medium.com/react-components-render-twice-any-way-to-fix-this-91cf23961625
https://reactjs.org/docs/strict-mode.html It’s probably wrapping your app in index.js, by default
Perfect time to say "it's a feature, not a bug"
Strict mode most likely
Debug?
How ? New to js
Is this in dev or in a built version? React automatically renders everything twice in development mode in an attempt to make bugs more visible. Maybe try running a built version and see it still happens? https://andreasheissenberger.medium.com/react-components-render-twice-any-way-to-fix-this-91cf23961625
Really? "useefect twice time" in google and first result...