[V4] Fast Refresh should dismiss runtime errors
Created by: gaearon
- Type
foo.bar()inside a component - See runtime error overlay
- Change that to
foo.baz()and save
Expected: see the foo.baz() error overlay instead.
Actual: keep seeing the foo.bar() overlay with the new error being "added" (the screen says 1 of 2 errors).
In other words, when we do a Fast Refresh, we should always be dismissing the runtime overlay first.
This is because the previous error is stale by the time you save the code and likely irrelevant.