Javascript – How to list results using state when clicking a button
I am trying to write a component that lists a set of results when clicking the Find button. However when I click the Find button, the results state variable is not being reset when I call setResults([]). Also it does…