question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

clearHistory is removing the Frame component when the Frame is in a component template

See original GitHub issue

Version

2.2.0

Reproduction link

https://play.nativescript.org/?template=play-vue&id=eA0tz9

Platform and OS info

Nativescript-Vue 2.2.0 / Android 7.0

Steps to reproduce

My default Frame is in my App.vue component :

<template>
    <Frame>
        <Page>
            <StackLayout>
                <Label>App.vue</Label>
                <Button text="Button" @tap="onButtonTap" />
            </StackLayout>
        </Page>
    </Frame>
</template>

I’m creating my Vue root instance without inserting Frame like that :

new Vue({
  render: h => h(App),
}).$start()

And when i use a $navigateTo with clearHistory set as true, the default Frame from App.vue will be removed and i will not be able to navigate anymore.

I’ve created a reproduction link with Nativescript Playground so you can see what’s is happening

What is expected?

The default frame has not to be deleted

What is actually happening?

The default frame is removed

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
rigor789commented, Apr 6, 2019

No, VueRouter is not supported currently, and will not be for a while. You can use nativescript-vue-navigator as a minimalistic router that lets you keep track of the current route and lets you define routes in a central place.

1reaction
rigor789commented, Apr 6, 2019

Looking at the code, this seems like a bug, however it can easily be worked around, either by defining the frame in main.js in the render function, or extracting the first page into a component, and rendering it that way: https://play.nativescript.org/?template=play-vue&id=eA0tz9&v=3

I have plans to improve Frames in general, and will investigate this further.

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - How to clear navigation history in a frame when using the ...
Just wrap the solution with NavigationService.RemoveBackEntry method in the behavior/attached property and apply it to your Frame in xaml.
Read more >
Routing breaks when using Frame.goBack(to: BackstackEntry)
For example: Navigate to another page. import { Component, OnInit } from "@angular/core"; import { ActivatedRoute, Router } from ...
Read more >
How to Clear Your Browser History - Delete Your Browsing ...
Click that same library tab, select "History" and then "Show all history" down at the bottom.
Read more >
Clear browsing data - Computer - Google Chrome Help
You can control your history and other browsing data, like saved form entries. You can delete all of your data or just some...
Read more >
How to clear out a frame in the Tkinter? - Tutorialspoint
If we want to clear the frame content or delete all the widgets inside the frame, we can use the destroy() method.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found