you can't pass hooks through props and more importantly, you must use hooks on top level and not in functions like handledelete instead import the hook and use it:

// export
export const usefetchandhighlight = (index) => {...}

// usage
import { usefetchandhighlight } from './usefetchandhighlight.js';

// don't use inside function

Related Query

More Query from same tag