score:1

This is the first time I'm trying to answer a question.

You can send your handleSubmit function to the InviteCard component on Invitees.js as props:

<InviteCard tab={tab} user={user} teamId={teamId} onSubmitInvitee={handleSubmit} />

Then on InviteCard.js use it whenever you need it after destructuring it with the rest of your props. Perhaps inside the inviteToTeam function at the last else statement:

  } else {
    notify("Invite sent.");
    setWhatToReload("invite data");
    onSubmitInvitee();
  }

Related Query

More Query from same tag