Skip to content

Can NavigatorIOS notify that a "back" happened? #26

Closed
@zertosh

Description

@zertosh
Contributor

Not sure if I'm missing something, but does NavigatorIOS have a way of notifying its owner that there is a new top route because the "<" back button was pressed? Otherwise, to get that functionality, the removed component would have to itself notify during componentWillUnmount, and that just feels weird.

Activity

vjeux

vjeux commented on Feb 2, 2015

@vjeux
Contributor

cc @evv

vjeux

vjeux commented on Feb 2, 2015

@vjeux
Contributor

@ericvicenti actually :p

zertosh

zertosh commented on Feb 2, 2015

@zertosh
ContributorAuthor

@vjeux: So far I'm having a great time with react-native. I wrote a tumblr browser that uses the flux pattern heh. This is what it looks like: min-s-react-native-demo-gif. (I'm not inlining the gif because it's too distracting.)

vjeux

vjeux commented on Feb 2, 2015

@vjeux
Contributor

Nice! Glad to hear :)

Hopefully we can get gif support soon so that you can have a fully functional app soon

paramaggarwal

paramaggarwal commented on Feb 4, 2015

@paramaggarwal
Contributor

Unfortunately, the default back button of UINavigationController does not provide an event. The way to get around it is to either set your custom back button on the left side, or to implement - viewWillDisappear: in iOS. So I guess, this limitation is here to stay.

vjeux

vjeux commented on Feb 7, 2015

@vjeux
Contributor

Since iOS doesn't support it, let's close this for now.

liubko

liubko commented on May 16, 2015

@liubko
Contributor

@paramaggarwal is it possible to be notified when any rote changes?
something like

<NavigatorIOS onChange={...}
              initialRoute={...} />

I mean when someone do navigator.push(...)

paramaggarwal

paramaggarwal commented on Jun 22, 2015

@paramaggarwal
Contributor

@liubko please look into Navigator instead, which is much more customisable. Docs are here: Navigator Comparison

arypurnomoz

arypurnomoz commented on Jun 22, 2015

@arypurnomoz

i think you can wrap the route component with a wrapper and listen to the wrapper's componentWillUnmount

added a commit that references this issue on Aug 5, 2015

9 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @vjeux@BSN4@njt1982@paramaggarwal@zertosh

        Issue actions

          Can NavigatorIOS notify that a "back" happened? · Issue #26 · facebook/react-native