Skip to content

vue-doctor/architecture/no-nested-component-definition ​

Move to a separate .vue file or to a composable

PropertyValue
CategoryArchitecture
Default Severitywarning
Confidencemedium
FixableNo
Engineoxlint
Sincev1.0.0
Frameworksvue, nuxt
Test filesNot checked (which files)

Why it matters ​

Move to a separate .vue file or to a composable

How to fix ​

Review the finding and update the code according to best practices below.

Agent Guidance ​

A component defined inside another component is recreated on every render and loses state. Move it to its own .vue file or to module scope and import it.


Rule source: vue-doctor/architecture/no-nested-component-definition

Released under the MIT License.