The function is called as an event handler and the searchTerm comes from the data passed to emit. I have tried out the application on Codesandbox and it is working.
Am I missing something?
You're right. I misread the definition.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.