jsonhero-web
jsonhero-web copied to clipboard
fix #95: App crashes on URL preview when connection is lost
closes #95
The error is triggered by the fetch() function after calling useFetcher.load(). There doesn't seem to be an easy way to catch this error. I tried using the ErrorBoundary feature from Remix but that ended up replacing all of the columns by an error message. An alternative suggested here is to use navigator.onLine to check if the user is online before making the call. I implemented that and it works well when switching the browser to offline mode.