score:1

Accepted answer

try adding namesearch to the list of dependencies for usecallback:

const fetchdata = usecallback(async () => {
  ...
}, [license, namesearch]);

and make sure setnamesearch is actually used inside search.js so that it will have a value.


Related Query

More Query from same tag