My React app is catching the error and correctly displaying my custom error message, but after a second it still displays the original error logging. So the fallback UI then
I think I got it. The create-react-app
package has a tool called the react-overlay-error. This shows error messages from the console as an overlay over your app so you can easily check the stack trace and debug.
This won't show up in production mode, it's just a development tool duplicating the normal browser console.
You can hide this by pressing Escape to see your overlay again.
If you want to get rid of it, this answer may help.