I am looking to implement a real-time search feature on my Twitter clone in order to locate other registered users. These users are stored on the backend using Firebase.
The users are located on the backend, and here is an example of the search functionality that I want to achieve.
This is what I have attempted so far:
<script>
export default {
data() {
return {
search: "",
users: ['Dummy', 'Users', 'From', 'Backend'],
};
},
methods: {
findUser(){
const result = this.users.find(user => user.includes(this.search))
console.log(result)
},
},
};
</script>
Can anyone point out what mistake I might be making?