[Vuejs]-Laravel/Vue Component Registration and Vue Instantiation

1๐Ÿ‘

โœ…

Q1. You should register all your Vue Component that you will be using inside a blade file.

On the resource folder at the app.js
Vue.component('example-component', require('./components/ExampleComponent.vue').default); if you are just using a component on a single parent component you dont need to register the component globally you just register it in the parent component file like so

//On Parent Component file
import ChildComponent from './ChildComponent.vue' //import child component

 export default 
{ components: { ChildComponent } // child component registration
,

Q2. One Vue instance is enough

Q3. You dont need a vuescript if you are already using a vue component vue scripts should go in the vue component file

๐Ÿ‘คPresmelito

Leave a comment