native-navigation icon indicating copy to clipboard operation
native-navigation copied to clipboard

[Request] Get current state

Open braco opened this issue 8 years ago • 3 comments

It would be helpful to have something like

Navigator.status()

to retrieve the current Navigation state

Also, is there currently a way to retrieve the initial Route when reloading? It doesn't seem like onAppear/onEnterTransitionComplete events are fired. Don't know if that's a bug or by design.

braco avatar May 11 '17 19:05 braco

I don't quite follow what you are asking? What do you mean by the current navigation state?

benkraus avatar Jun 01 '17 05:06 benkraus

Navigation stack and/or the current topmost component. The original reason I asked was to keep nav state visible on a toolbar. I guess since there are differentiations made in the type of component (presentation vs push), it would ideally represent that in the object. Maybe something like this?:

screen = { name, component, modals }
stack = [screen, screen, ...]

braco avatar Jun 01 '17 21:06 braco

+1

pewh avatar Jul 30 '17 10:07 pewh