Closed krschacht closed 7 months ago
I expect the library to be compatible with RN 0.73 - we're currently using it in a project built with Expo 49. Expo SDK 50, due to be released in January, uses RN 0.73.
@pfeiffer I created a fresh RN 0.73 project and basically re-implemented your example app within it (using react-native 0.73 package) and I got it working. So you are right — no fundamental compatibility issues. I'm trying to do the same with Expo 50 so I can try to integrate this with the new file-based router. Have you done any work to re-factor the routing code in your /example app to use the new file-based expo routing?
I spent all day trying to get the /example app working in a fresh Expo 50 install and a fresh Expo 49 install. I can't get it working with either. I'm really stumped because I'm not getting an error message, it's just that the WebView is not rendering the contents (nor making any request to the server). I have the exact same code working in a bare create-react-native RN 0.73 project but I cannot get it working in a bare expo-49 project.
Could you try creating a bare expo-49 app and get /example working in it? I think that would be a really helpful reference, not just for me, but for others too.
This is exact sequence of commands I did:
npx create-expo-app ExampleExpo49 --template blank-typescript@49
npm install -g eas-cli
npx expo install expo-dev-client
eas login
eas build
eas build --profile development --platform ios
npx expo start
I install the development client on a real device, scan the QR code from expo start, and at this point the sample template app is running in.
After that I added in the /example project:
Edit package.json to add these lines:
"@react-navigation/bottom-tabs": "^6.5.7",
"@react-navigation/material-top-tabs": "^6.6.0",
"@react-navigation/native": "^6.0.10",
"@react-navigation/native-stack": "^6.6.2",
"expo-dev-client": "~2.4.12",
"expo-splash-screen": "~0.20.5",
"krschacht-react-native-web-screen": "1.0.0",
"react-native": "0.72.6",
"react-native-pager-view": "6.2.2",
"react-native-safe-area-context": "^4.3.1",
"react-native-screens": "^3.13.1",
"react-native-tab-view": "^3.4.0"
Copy over example/App.tsx and everything from
example/src/*` into the project and restart it. I have the example/server running in another tab. This is what comes up:
The tabs work at the bottom but I can't get anything to load in the Web Screen. I've hacked away at this all day, trying lots of different tactics to debug. Oddly, I do basically the exact same steps in a bare react-native-0.73 project and it works.
Hello @krschacht, I've created a bare Expo app (with npx create-expo-app --template bare-minimum
), and everything seems to be working fine. Check out this repo. Although I haven't tested it with Expo Go, webview accurately displays the content when running the app on a simulator (npm run ios
). Please note that I'm using gitpkg to obtain libraries (react-native-turbo
and react-native-web-screen
).
@pklatka This is incredibly helpful, thanks! I am not sure what I was doing different on my end. On theory I had was that I was running XCode 14.x so I also upgraded that to 15.1. But regardless, your repo worked for me so I'm now over this hump. I really appreciate the time you took to create that repo.
However, I did encounter a three small bugs with your repo, as-is, when using the glitch demo app you pointed to. This is when I went through all the options on the Turbo Native Demo. The first bug is probably known, but I think the second two are legit bugs:
ERROR The screen 'Fallback' was removed natively but didn't get removed from JS state. This can happen if the action was prevented in a 'beforeRemove' listener, which is not fully supported in native-stack.
Consider using a 'usePreventRemove' hook with 'headerBackButtonMenuEnabled: false' to prevent users from natively going back multiple screens. at NativeStackViewInner (http://10.0.0.127:8081/index.bundle//&platform=ios&dev=true&hot=false&transform.engine=hermes&transform.routerRoot=app:144188:22) at RNCSafeAreaProvider
([screenshot of this error](https://share.zight.com/d5u2l7p5))
@pklatka I have fixed the Menu example and the Overflow Menu example by adding those two Strada components. I just emailed you about this. I would like to help you make this overall react-native-turbo project better, if you would like help. I emailed you at contact@klatka.it so take a look
Should work with RN 0.73 now - we use it via Expo SDK 50.
Everything should work properly for RN 0.73 - see the turbo-demo-expo-example
app in examples
directory.
I can tell you guys are updating this project. It's currently in a state where it won't build and run properly, but if I go back to the latest tagged commit then things work.
While upgrading the example app, are you planning to upgrade its react native version to the latest 0.73 or is there an inherent incompatiblity? I pulled your repo and am trying to do it myself but I've not been able it.