&">
I'm currently developing a Twitter clone using Vue 3. The source code for the same can be found here.
HomeView.vue
The code is as follows:
But after performing the same operation, I am getting the following error in the developer's console.
Uncaught (in promise) ReferenceError: Cannot access 'tweets' before initialization
Not a composition API expert, but I wanted to take a look at thelifecycle a>, you can't use tweets directly like this because they are not usable directly. They will then be filled.
Although your template is synchronized, it will error because it cannot access something when it is (originally) undefined.
Making
may be a solution, otherwise it may be with
watch
andsuspense, not sure.PS: There are 2 more
tweets
variables here, which may cause some errors, please be careful.