watch: { searchText: { handler: 'fetchPostList', immediate: true } }, methods: { fetchPostList () { // ajax call to fetch post list } }
Vue Js Call Watcher Immediately After Component Ready
195
3 years ago
0 comments
Sometimes you might need to call Vue Js watcher immediately after the component is ready and to do that you can specify the "immediate" property to "true" to the watcher method.
Topics:
Frontend
Resource
Average
Average
Support Us
If you like our tutorial, support us by being our Patreon or buy us some coffee ☕️
Leave a reply