State
After the submit button is clicked, show Saving, then update the message on success or failure.
After the submit button is clicked, show Saving, then update the message on success or failure.
Remember the current condition: After Save is clicked, the page records that it is submitting, preventing repeat clicks and showing progress; it then changes to success or error when the request ends.
State drives what appears: The same button and message area show different content for different values. A state change should come from an actual action or request result, not an early success label.
Check the state in this save flow: after a click, show Saving and prevent duplicate submission; show Saved only after the API succeeds; show an error and retry path on failure. Verify both success and failure afterward.