slack-digest/2021-05-28.md
Fri, 28 May 2021 08:32:46 GMT
Join the conversation at slack.cordova.io
Thu, 27 May 2021 13:46:36 GMT
@hilah1999 says
Hi, as an app developer do I have a way to access through the code and see who my active subscribers are?
Thu, 27 May 2021 16:16:13 GMT
@fessehay says
Hey! When I use
window.reload()on the react SPA since it uses a router it can not find the different routes made via the React Router. Any suggestions on if I can add a redirect or point more routes to theindex.html?
Thu, 27 May 2021 16:18:20 GMT
@norman137 says
It's best to use a single index file and use hash-based routing. The URL isn't displayed to the user anyway so it doesn't need to be clean looking.
Thu, 27 May 2021 16:19:27 GMT
@norman137 says
the clean url routing using the history api that is often desired in a traditional website doesn't work because there is no web server backing the request that can redirect any url to your
index.html
Thu, 27 May 2021 16:26:02 GMT
@fessehay says
Oh okay that makes sense to me. So there really isn't a popular way to address adding history api support via the
config.xml?
Thu, 27 May 2021 16:32:46 GMT
@norman137 says
No. History API does work, but just like a traditional website if you try to refresh the webview, it won't work without configuration on the server. In Cordova's case there is no way to configure that rerouting. You might be able to do it via a cordova plugin, but I'd probably recommend just using the hash-based for the cordova app
Thu, 27 May 2021 16:35:07 GMT
@fessehay says
Cool thanks again for the help @norman137. I've have actually been going nuts trying to understand the issue and your explanation really helps!
Thu, 27 May 2021 22:22:47 GMT
@mathewp.94 says
Is the authour of the https://github.com/dpa99c/cordova-diagnostic-plugin plugin here? I want to try PR some changes but I'm not an iOS dev so I may need some assistance