# Use suspensible Prop for Nested Suspense (Vue 3.3+) ## Rule When nesting `` components, use the `suspensible` prop on the inner Suspense to properly coordinate with the parent Suspense. Without this prop, nested async components may render empty nodes until resolved instead of showing fallback content. ## Why This Matters Without the `suspensible` prop, the inner `` is treated as a synchronous component by the parent. This causes: - Empty nodes appearing briefly during async resolution - Multiple patching cycles as the component tree updates - Inconsistent loading states that confuse users ## Bad Code ```vue ``` ```vue ``` ## Good Code ```vue ``` ## Complex Layout Example ```vue ``` ## How suspensible Works | Configuration | Behavior | |--------------|----------| | No `suspensible` prop | Inner Suspense treated as sync; parent doesn't wait for inner async deps | | `suspensible` on inner | Inner async deps bubble up to parent Suspense for coordinated loading | ## When to Use Nested Suspense **Use nested Suspense with `suspensible`** when: - Different page sections should show their own loading states - You want granular control over which parts show loading indicators - Sections can load at different speeds and should update independently **Avoid nested Suspense** when: - A single loading state for the whole component is sufficient - The complexity isn't worth the UX benefit - You're targeting Vue versions before 3.3 ## Key Points 1. Always add `suspensible` prop when nesting Suspense components 2. Without `suspensible`, expect empty nodes and multiple patching cycles 3. This feature requires Vue 3.3 or later 4. Use nested Suspense boundaries strategically for better UX, not everywhere 5. Each Suspense can have its own fallback for section-specific loading states ## References - [Vue.js Suspense Nested Documentation](https://vuejs.org/guide/built-ins/suspense#nested-suspense)