G
G
GizzaProger2020-07-31 10:30:07
Vue.js
GizzaProger, 2020-07-31 10:30:07

How to save a vue component with all changes and then render that component in the same state?

All the best.
The user goes through the tasks and at any time can close the tab with the tasks already partially or completely completed.
You need to save his progress in the database and the next time you open these tasks, show him tasks with progress.
That is, you need to save the user's progress so that he can then receive it and display it.
I wanted to do this
Create a component map and use the render function to start rendering the components one by one.
To do this, reursively called something like

function recursion(el, callback) {
     callback(el);
     callback(el.$children);
}


But the usual tags like div, span, etc. are not included in $child. Because of this, the enumeration is not complete.
Maybe there is another way or somehow it is possible to finish my solution?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question