A way to render code only if JS code can't be run
I noticed (at least in development), that when the app refreshes due to code change, and if I press back button to go to a previous version of the app which is no longer valid, the app doesn't work (rightfully so, because the previous iteration of the dev app no longer exists).
Interestingly, I noticed that the HTML code generated by previous version of the now non-existent app, stilll works.
But this previous version of the app is static HTML, and JS does not work until I refresh the app.
I'd like to know if it's possible to show a different code to ask the user to "refresh the page" if a user reaches this problem.
Note: I have not tested this in production, so I do not know if this is a problem in production.
Interestingly, I noticed that the HTML code generated by previous version of the now non-existent app, stilll works.
But this previous version of the app is static HTML, and JS does not work until I refresh the app.
I'd like to know if it's possible to show a different code to ask the user to "refresh the page" if a user reaches this problem.
Note: I have not tested this in production, so I do not know if this is a problem in production.