Deep Linking when the app is not installed in the device - reactjs

I have this case where when clicked a link I redirect the user to the app using deep linking (made with RN) if the app is installed.
However, if the app is not installed instead of displaying error or a popup, I need to navigate to another route in the web, example: /web-login. I created the link for my app and it works, how do I test if the user has the app installed in the device, so then I can navigate to the other route if the user does't have it.
If the app is not installed I get something like: Browser cannot open the page because the address is invalid.

Related

react-scrollspy-nav causes error after deploying react app

I want to active menu on scroll in my react app. I have used a react-scrollspy-nav for this functionality. It works fine when i run it on local server but when i deploy so it shows a blank screen
i have used a react-scrollspy-nav in my app, which is working perfectly on local server on my laptop but after deploying on netlify, it shows blank screen with an error on console that says
Uncaught TypeError: Super expression must either be null or a function
at ScrollspyNav.js:423:1
Link of my react app
If i remove this module react-scrollspy-nav and deploy it, my app does not show blank screen and works well but without the functionality of scrollspy which i want in my app

AWS Amplify not opening file

I'm trying to open a .html file "resume.html" on my website. This is my "public" folder.
I'm using React, and I'm trying to open "resume.html" in a new tab on button click with this code:
<Resume className="resume" onClick={() => window.open("/resume.html", "_blank")}>View Resume</Resume>
Everything works fine during development. on my localhost: 3000, the resume opens in a new tab just fine. But when I host the site on AWS Amplify, the button click loads "index.html".
I have no idea why the AWS amplify server would be loading a different file than my localhost server.
If you use ReactJS then everything will go through a build step to create the deployment assets that make up the Single Page Application. The result of this build step is what will be deployed to be hosted on AWS.
For navigation in ReactJS it is better to use a routing library like React Router. You can create a new React Component for the resume content and navigate to it using a Router Link. This will work better for the Single Page Application to understand rather than opening a HMTL page with window.open.

Cannot access pages with direct url after building project for deployment Spring and React

When running my spring app from my IDE and running the React app from within VSCode, everything worked perfectly. I used the build script to build my React project, and then put the output into my /static folder of Spring. Then I used mvn clean install to build the .jar file. After running the entire app from the .jar file, I can access my homepage with localhost:5000. I can also use my navbar links to access different parts of the website, like the Home page and the About page... But if I try to manually enter the url localhost:5000/about I get a 404 Not found error.. What am I doing wrong?
My guess is that your Spring (webmvc?) application is not configured to listen to different URLs other than /. And while it may seem as if the navbar successfully redirects to http://localhost:5000/about, in reality the single page application uses JavaScript client-side routing to change the URL in the browser, unload the currently rendered page, and load another page.
If you are indeed using Spring MVC, you could (among other options) modify your Spring static resource configuration, modify your #RequestMapping to listen to multiple endpoints, or use a ViewControllerRegistry.

Routing doesn't work after deploying a Svelte Sapper export

I uploaded the export directory of a Svelte app using Sapper to example.com. In the /routes directory I created a page called foo.svelte. When I click on a link in the app that forwards me to /foo, I see that page, both locally and on example.com.
But when I go to example.com/foo directly in the browser, I get a 404. Understandable, because nothing is hosted on that address.
So what do I need to change on example.com so that the routing works not just from within the app, but also by typing in the URL directly in the address bar of the browser?
The site runs on Apache and I have Plesk as management tool.

"The webpage at chrome-extension://myextensionid/ might be temporarily down or it may have moved permanently to a new web address. ERR_UNEXPECTED"

I am developing a react chrome extension.
I have a footer bar to navigate across my pages(components).
I am using react-router-dom to switch/route between pages.
My extension works perfectly when debugging but, after I build it (npm run build) and Load Unpacked at my extensions, the first page renders good but when I click my footer navigation buttons, my extension shows this message:
The webpage at chrome-extension://myextensionid/ might be temporarily down or it may have moved permanently to a new web
address. ERR_UNEXPECTED
Is it because I did not publish it yet, routing only works after I publish my extension?
Any ideas what can be wrong, can you please help me with this issue?

Resources