[Request] Get current state
braco opened this issue · 3 comments
braco commented
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.
benkraus commented
I don't quite follow what you are asking? What do you mean by the current navigation state?
braco commented
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, ...]
pewh commented
+1