NuxtN
Nuxt17mo ago
Maciej

<NuxtPage> events?

I would like to ask whether handling child component events directly in the <NuxtPage> component could be considered an anti-pattern. I encountered this solution during a code review by my colleague, and it seems to me like an improper approach.

For example:

<NuxtPage
  @some-event="handleEvent"
/>


It seems highly problematic to me due to the fact that there is no certainty about which component will be rendered in place of <NuxtPage>. As a result, there is no guarantee regarding which events can be handled.
Was this page helpful?