Start here. This is the direct spoken answer to practice first.
Overview
Repeated development work is a diagnostic signal, not a reason to disable the safety check or hide a lifecycle bug.
Strict Mode deliberately repeats some development-only work, including rendering components and rerunning Effects and ref callbacks. This exposes impure rendering and setup code that lacks matching cleanup. It does not mean production performs every operation twice. I fix the component so a setup-cleanup-setup sequence is safe instead of adding a flag that suppresses the second call.