Instawork / hyperview

Server-driven mobile apps with React Native

Home Page:https://hyperview.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using react-navigation native header for screens

rtpm opened this issue · comments

commented

Can native navigation header be used with hyperview?

In the demo app, a native navigator is hidden, and every screen returns it's own header instead of modifying the
title of the native one.
This means there are no iOS swipe left to right navigation and native look available.

Thanks

@rtpm Technically you can use any navigation implementation you want, as long as you support the callbacks described here: https://hyperview.org/docs/reference_hyperview_component (push(), back(), openModal(), closeModal(), etc).

The demo app is built using React Navigation which I believe does support title bars with transitions and swipe gestures. In fact the demo app supports left-to-right swipe, albeit without the title transitions you described. If you want to try using React Navigation's support for native headers, let me know and I can try to help.

You may be interested in the work we are doing to expose navigation hierarchy through the Hyperview XML: https://github.com/Instawork/hyperview/commits/hardin/navigator-integration

This will enable native navigation to be used and controlled through the markup, without requiring custom JS logic.