Is there any default function available in SharePoint list view?

Is there any default function available in SharePoint list view like if I am sorting any of the column on sorting I want to execute some code or on SharePoint list view load I want to execute some code. like wise is there any function available so that i can override those methods in my spfx code.

Thanks in Advance.