You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I followed along but still got this warning in the console every time I clicked on the "Add a Task" button: Extraneous non-emits event listeners (addTask) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option. at <AddTask onAddTask=fn<bound addTask> > at <App showAddTask=true onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< Proxy {deleteTask: ƒ, addTask: ƒ, toggleStatus: ƒ, …} > > at <RouterView showAddTask=true > at <App>
I found out that declaring the emitted event works in removing the warning. Hope this helps.
Add emits: ['add-task'] to the export in /src/components/AddTask.vue
The text was updated successfully, but these errors were encountered:
lulu-cao
changed the title
Extraneous non-emits event listeners (addPost) were passed to component
Extraneous non-emits event listeners (addTask) were passed to component
Nov 6, 2022
Thanks for the tutorial. It's great!
I followed along but still got this warning in the console every time I clicked on the "Add a Task" button:
Extraneous non-emits event listeners (addTask) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.
at <AddTask onAddTask=fn<bound addTask> >
at <App showAddTask=true onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< Proxy {deleteTask: ƒ, addTask: ƒ, toggleStatus: ƒ, …} > >
at <RouterView showAddTask=true >
at <App>
I found out that declaring the emitted event works in removing the warning. Hope this helps.
emits: ['add-task']
to the export in /src/components/AddTask.vueThe text was updated successfully, but these errors were encountered: