Created
July 26, 2019 07:17
-
-
Save jcricaro/417aa34790235525f4b2b00f67b2bee2 to your computer and use it in GitHub Desktop.
Smarter Watchers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// watchers can have texts instead of functions | |
watch: { | |
searchText: 'fetchUserList' | |
} | |
// no need for created() this.fetchUserList() | |
watch: { | |
searchText: { | |
handler: 'fetchUserList', | |
immediate: true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment