I'm using keep-alive
in the router-view
like this:
<keep-alive>
<router-view></router-view>
<keep-alive>
So I'm saving all "pages" of my app. My questions:
How many components can keep-alive save?
Can I program something to make keep-alive save just one component (the last one)?
Thanks in advance
I found a solution for my problem using the sugestion of @zizzo. I saved in the vuex the component that I wanted to save when I want to save (the last one). The code stayed like this:
<keep-alive :include="[componentToKeepAlive.name]">
<router-view></router-view>
<keep-alive>
...mapGetters({
componentToKeepAlive: 'global/componentToKeepAlive'
})