5 ms·
Always interesting to see how cross platform is evolving (this and also Xamarin update recently), wonder how the Google and Apple regard this. Anyway, I just t
by hypercluster 10y ago
Always interesting to see how cross platform is evolving (this and also Xamarin update recently), wonder how the Google and Apple regard this.
Anyway, I just tried out the Expo App on iOS and noticed that the back swipe animation does not seem to be native in the examples. Is there a reason for that? (that's something I always try out of I want to check if an app is native).
- brentvatne 10y agoHello! The examples use a navigation library that is implemented entirely in JavaScript and it does not currently aim for 100% accuracy for platform gestures and animations. Pure JS navigation is a work in progress with React Native but, in my eyes, it's the ideal end-state (see a post I wrote here for more info: https://blog.expo.io/good-practices-why-you-should-use-javascript-whenever-possible-with-react-native-26478ec22334#.8m1k008ip https://blog.expo.io/good-practices-why-you-should-use-javas...), but to get there we need some more powerful low level primitives such as a better gesture API. If you prefer to trade-off customizability for platform-specific animations, you can use NavigatorIOS with Expo/CRNA - https://facebook.github.io/react-native/docs/navigatorios.html https://facebook.github.io/react-native/docs/navigatorios.ht.... If you eject, you can use a library like react-native-navigation (https://github.com/wix/react-native-navigation https://github.com/wix/react-native-navigation) which bridges the native navigation APIs, or an upcoming library from Airbnb which they use in their app. Also, I'm curious which examples stood out to you. The "Growler Prowler" app intentionally pushes a screen on top without sharing a navbar, even though this is possible, because this works better for the detail screen. See the beautiful PocketCasts app (https://www.shiftyjelly.com/pocketcasts/ https://www.shiftyjelly.com/pocketcasts/) for the design inspiration there. Hope that helps!
- deleted 10y ago[deleted]
- mwcampbell 10y agoIt seems to me that you're repeating the mistake that caused Java AWT and Swing applications to feel foreign on any mainstream desktop system. https://news.ycombinator.com/item?id=8965349 https://news.ycombinator.com/item?id=8965349 A pure-JavaScript implementation of navigation might feel almost native on today's mobile platforms if you work hard enough at it. But will it feel native in the next release of the OS? And does it feel native for all users? For example, when a user of the VoiceOver screen reader on iOS navigates to a new page in your app, do they hear VoiceOver's "new screen" sound effect, as they do when using a real UINavigationController? Also, VOiceOver has a special gesture for going back. Will that work in your nav implementation? My point is that when you start with cross-platform and try to tweak and tune it until it's native, you might miss some subtleties, and it might still not feel native to some users.
- danabramov 10y agoFor what it’s worth Airbnb just open sourced a React Native library that implements navigation natively on both platforms. Check it out: https://github.com/airbnb/native-navigation https://github.com/airbnb/native-navigation
- hypercluster 10y agoThanks for the insights! I tried out all the featured projects and they all have the "card" swipe. Reading your post I get why it's implemented like this. Getting as much in JS as possible. However if you push it too far you'll end up with something like Ionic. I guess it'll all meet somewhere in the middle where you have the basic blocks native and JS where native is too hard.