[Vuejs]-Vuejs separation and communication between components

0👍

You don’t have to make the login box a component. If you plan on reusing an html element i.e. a modal through out your app, then I would consider turning it into a component. If you plan on reusing methods, you would have to covert them into a mixin – https://v2.vuejs.org/v2/guide/mixins.html . You can then extend the mixin to be used in any component you require it.

0👍

The easiest way to achieve this is using localStorage. However, the best way is using vuex (https://vuex.vuejs.org/) which is state management.

Leave a comment