[Vuejs]-Components and Slots approach

0👍

I don’t think slots are designed to do this. If you need data to be persisted between parent and children then use either props as @Belmin Bedak suggested. When you pass a prop to a component it will be available to all its children.
If you need to persist state on front-end I strongly recommend using Vuex as source of data for all components ( only use if it becomes more complex to have data scattered across components ).

Leave a comment