Wednesday 8 July 2020

ionic react here projects


reference:
Route change trigger url change, but doesn't render
https://github.com/ionic-team/ionic-framework/issues/20707

react-router does not work in production and surge deployments


For surge, you can add a 200.html file which contains the same contents as the index.html you're deploying (or just rename it to 200.html) - this will then be served to users at any URL they visit which doesn't correspond to a static file, allowing your app to start running.

looks like you're using create-react-app. This works when you're developing locally because create-react-app's react-scripts package handles serving your index.html as a fallback for these requests.

https://stackoverflow.com/questions/44491184/react-router-does-not-work-in-production-and-surge-deployments

No comments:

Post a Comment