I am trying to loop over and create another array of the type of information that I need. However I am getting the following error:
Expected 2 arguments, but got 1.ts(2554)index.d.ts(1104, 74): An argument for 'deps' was not provided. const analyticsTeamNames = useCallback( (teamNames: string | null) => const teamNames = []; for (let index = 0; index < selectedTeams.length; index++) { const element = selectedTeams[index]; const team = teamsData?.find((item) => item.id === element); teamNames.push(team?.name); } [teamNames], );What exactly am I missing?