same issue, any suggestion?
found a substitute solution
use mounted() or asyncData()
but still dont know why created() run twice
found answer: https://nuxtjs.org/guide/plugins
It is important to know that in any Vue instance lifecycle, only beforeCreate and created hooks are called both from client-side and server-side. All other hooks are called only from the client-side.
why beforeCreated and created are call twice(client and server)?
Is there some different?
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
found answer: https://nuxtjs.org/guide/plugins
It is important to know that in any Vue instance lifecycle, only beforeCreate and created hooks are called both from client-side and server-side. All other hooks are called only from the client-side.