E
E
eldar_web2017-10-12 21:32:42
Vue.js
eldar_web, 2017-10-12 21:32:42

When building Vue 2, App.vue is created and connected to main.js. What is better to choose for the main entrance?

Or where is it more correct to write all the main code: in App.vue or main.js?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Artem0071, 2017-10-13
@eldar_web

Do any connection of libraries, routes and components in main.js.
App.vue is just a normal component (not quite normal of course, but as an entry point for other components)
index.html - don't touch it. Well, or you can connect external scripts

A
Andrey Khokhlov, 2017-10-12
@andrhohlov

main.js - entry point
App.vue - root component

G
Gennadiy Balachkov, 2017-10-13
@gennadiy403

There is no "core code" in vuejs. All functionality is implemented through components, the tree of which starts to be imported from the App.vue file. And nothing else, nothing better, just like that)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question