-
-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expo 52 support #498
Comments
There shouldn’t be any issues since this library is JS only. The bigger thing to watch for would be upgrading to React Navigation v7, but I think that should work too. Just need to confirm it. SDK 52 should have no affect on Solito |
I believe expo 52 comes with expo router v3, and will ship with react navigation v7 by default https://expo.dev/changelog/2024/10-24-sdk-52-beta#expo-router |
This is what I hoped for as well, but it looks like Expo SDK 52 and expo-router has some sort of compatibility issue with solito. See my test repo https://github.com/troyshu/expo-52-solito-test, which is just the solito-expo-router demo app with an upgraded Expo SDK. The
Any ideas @nandorojo? |
That looks like an expo router error in particular. There might be clashing versions of react navigation sub packages, be sure it’s not in package json |
Thanks for the quick response @nandorojo! No explicit apps/expo/package.json
I'll keep poking around but would love more eyes on this. hope we can get a working example with Expo 52 and solito soon :) |
Maybe duplicate react versions, a yarn resolution could fix this |
I added the following to
Updated at https://github.com/troyshu/expo-52-solito-test/tree/expo-52. Could the error be related to the New Architecture https://docs.expo.dev/guides/new-architecture, since the error is native only? I tried replacing Solito Links |
I dug into this some more (actually read the stacktrace...) and arrived at the same fix that's already in PR: #497. Here's my working sample app of solito with Expo SDK 52: https://github.com/troyshu/expo-52-solito-test/tree/expo-52 @nandorojo what can we do to get that PR merged? |
Ah, got it, merged |
I actually created the upstream PR from react navigation for LinkingContext too haha |
Awesome, thanks! Looking forward to a new release! Realizing I didn't test backwards compat with Expo 51, 50, etc... not sure if @benjipott of the merged PR #497 did |
@troyshu: I tried your patch and it works, but my navigation with router.push is not working anymore. With expo-router i have no problems. Did you face the same issue? |
I did encounter some routing issues after this Expo 52 patch but nothing specific to solito I think. Can you post another issue with the details (eg what the error is, the stack trace, occurring on native and/or web), tag me, and I can try giving you some ideas? |
No error, only routing does not work with useRouter() -> |
Hm it could be some bifurcation between Expo Router/React Navigation. If I saw a reproduction it might be easier to say. We’re using useLinkTo from react navigation, does that work? |
Hm, useLinkTo is working...I'm looking further. |
Can you make sure you don’t have multiple versions of react navigation installed |
Closing this, please open a separate issue if needed. For anyone who finds this issue, please upgrade Solito 4.3.0 |
Release here: https://github.com/nandorojo/solito/releases/tag/v4.3.0 |
Got it. It's an useLayoutEffect with navigation.setOptions. This is actually not working (why ever):
|
That looks unrelated to this issue (and Solito), could you open an issue on react navigation? |
FWIW I'm running into the same issue as @megacherry. Upgraded to Expo52, updated all my dependencies (including [email protected]), and now my navigation does not work when using What's especially weird is that if I add a Also, this doesn't happen on every route. Some routes it works fine and navigates properly. Other times it doesn't. Trying to find out why Replacing "useRouter" with "useLinkTo" from "@react-navigation/native" runs into the same problem: sometimes no navigation. So indeed likely unrelated with Solito and something with react-navigation 7. 😔 |
Alright I found something interesting, this navigation issue only happens if I have a Stack.Screen defined in the same file as my route. For example: https://github.com/mozzius/graysky/blob/9d4825ad66058c2127e049093d3f6accbac1a7d8/apps/expo/src/app/(tabs)/(feeds%2Csearch%2Cnotifications%2Cself)/feeds/manage.tsx#L22-L57. I believe the alternative here would be defining this Stack.Screen in an For example, given this setup:
When trying to
However, this DOES WORK:
This leads me to think there might be something at play with |
Yeah, i had the same result. The routing worked without Stack.Screen. But I gave up and downgraded to expo sdk 51 again. |
Heyo, wondering if there's any breaking changes I need to worry about when using solito with expo 52, and if there will be an explicit update for supporting expo 52.
The text was updated successfully, but these errors were encountered: