Hacker News new | ask | show | jobs
by brentvatne 3387 days ago
Hello!

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-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.ht.... If you eject, you can use a library like 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/) for the design inspiration there.

Hope that helps!

2 comments

It 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

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.

For 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
Thanks 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.