79256182

Date: 2024-12-05 20:50:19
Score: 1
Natty:
Report link

What you described is very similar to react strict mode behavior. If you're in development mode, it is active by default

This is the relevant part from the documentation:

Strict Mode enables the following development-only behaviors:

Your components will re-render an extra time to find bugs caused by impure rendering. Your components will re-run Effects an extra time to find bugs caused by missing Effect cleanup. Your components will re-run refs callbacks an extra time to find bugs caused by missing ref cleanup. Your components will be checked for usage of deprecated APIs.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Starts with a question (0.5): What you
  • Low reputation (0.5):
Posted by: Kaveh Movahedi