Next.js 14 App Router: Code after return still executing, causing unexpected behavior
Issue:
I’m encountering an issue in a Next.js 14 App Router project where code after a return
statement is still being executed, even though the condition for returning a component is met. This behavior causes unexpected side effects such as extra API calls being made after the return
.