Closed pauldcollins closed 7 months ago
I just wanted to give an update here as I have tried all the options on this repo and still can't seem to get it to work:
1.) I have tried using the code here on my landing _layout.tsx
page, but I still get the flash of the page not found first.
2.) I have tried implementing all the code in this branch, making sure my hooks/useShareIntent.js is the correct one for the Expo Router 49 branch, but still no luck.
3.) I also tried implementing the fixes found in this branch, including creating an [...unmatched].tsx
file, but that didn't work either. The shareIntent
variable always returns as null on this page. I know this has been addressed further down the comments, but I thought it might be worth trying at least.
I am still getting taken to the [...missing].tsx
page for a split second first, before the following code from layout.tsx
kicks in and takes me to the correct page.
useEffect(() => {
if (shareIntent) {
router.replace({ pathname: '/new/share-page', params: shareIntent })
resetShareIntent()
}
}, [shareIntent])
Please let me know if there are any other things I can try. I've run out of ideas!
For this problem, in fact we do not have the information synchronously and this make a screen flash.
To manage this problem we could add an "isLoading" state in the useShareIntent
hook in order to display a loader in the layout component (in absolute position while you check whether or not you have received a share intent).
Describe the bug I have an issue where I am getting a flash of a "screen doesn't exist" before navigating to the page within my app. I have stripped back all the code and it I still get taken to the "screen doesn't exist page". I suspect it's to do with Deep Linking, but I can't solve it.
I am using the Expo CI Typescript boilerplate, so I don't have an "app.js" file in the root directory, my setup came with the following:
To Reproduce
Here is the UI code I'm working with. Worth noting that even if I delete the router.replace below, it still navigates to the "missing" page. So I think that deep linking maybe an issue? I have not installed anything around deep linking, to be clear.
_layout.tsx
app/_layout.tsx (My tabs and initial route are setup here, it defaults to the index page)
Environment
Additional context Add any other context about the problem here.