nativescript-vue / nativescript-vue-navigator

A simple router for NativeScript-Vue, built on top of $navigateTo to simplify routing from within components
MIT License
98 stars 10 forks source link

Implicitly set an id to the `Navigator` frame #27

Closed rigor789 closed 4 years ago

rigor789 commented 4 years ago

When creating a Navigator frame, we should implicitly set an id and not use the default one.

The issue is when you have multiple frames, you might run into a situation where both the Navigator and your Frame will try to use the same ID.

In NativeScript-Vue 2.5.0 we removed the frame-id collision handling, as it was causing another set of issues (https://github.com/nativescript-vue/nativescript-vue/issues/532), causing the last created Frame instance with a given id to overwrite the previous one in the Frame lookup table causing unexpected navigation behaviour.

The fix is simple, we can add a new id property with a default value of navigatorFrame for instance, and refactor all calls to $navigateTo and $navigateBack to include this id as a navigation option.

github-actions[bot] commented 4 years ago

:tada: This issue has been resolved in version 1.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: