Rendering is not a spending decision
A page may mount again after navigation, error recovery or a framework development check. Those events synchronize UI state; they do not establish a new user intention to purchase work. A ref that suppresses a second effect run does not define a durable business action.
What to do next
- 01
Find mutation-bearing effects
Review effects that call your backend create route rather than merely reading task status. Move generation into a command invoked after the user approves the exact creative request, leaving effects to subscribe or fetch.
- 02
Keep commands durable
Give the approved action a stable application identity before dispatch. Repeated delivery of that command should resolve to the same local action, while a deliberate new creative attempt receives a different identity.
- 03
Test remount behavior
Run the screen under development checks, navigate away and back, and recover an error boundary. Confirm these lifecycle changes only reconnect to existing task state and never create another approved action.
A concrete example
Illustrative example: a result page mounts twice in development. Its effect reads task 82 twice, which is harmless to creative intent. The only create command remains the one recorded when the user pressed Generate on the approval screen.
Before you call it ready
- Inspect effects for create requests.
- Remount before the first response.
- Verify navigation does not create an action.
When to stop or choose another method
Stop automatic dispatch if the only evidence of user intent is component mounting; require the application's existing explicit approval command.
