I have the following components:
/components/SearchBlogs.vue
Search component to filter on blog.title
and blog.description
.
Look at my solution condesandbox
Here is an explanation:
You don't need to use EventBus. You can communicate with Search Component by v-model
, using prop value
and emiting updated value
from the Input.
Then your Main (List) Component is responsible for all the logic.
Thanks to that your Search Component is very clear and has no data, that means it has very little responsibility.
Please ask questions if I can add something to help you understand