Quastion with redirect Next [closed]

I am writing an application on react + next, and I encountered a redirect, I see in many places that after a redirect an empty object is returned, some do not return anything. Could you help me figure out why some write this way, others that way?