core.blade.php 1.5 KB

123456789101112131415161718192021222324
  1. # Inertia
  2. - Inertia creates fully client-side rendered SPAs without modern SPA complexity, leveraging existing server-side patterns.
  3. - Components live in `{{ $assist->inertia()->pagesDirectory() }}` (unless specified in `vite.config.js`). Use `Inertia::render()` for server-side routing instead of Blade views.
  4. - ALWAYS use `search-docs` tool for version-specific Inertia documentation and updated code examples.
  5. @if($assist->hasPackage(\Laravel\Roster\Enums\Packages::INERTIA_REACT))
  6. - IMPORTANT: Activate `inertia-react-development` when working with Inertia client-side patterns.
  7. @elseif($assist->hasPackage(\Laravel\Roster\Enums\Packages::INERTIA_VUE))
  8. - IMPORTANT: Activate `inertia-vue-development` when working with Inertia Vue client-side patterns.
  9. @elseif($assist->hasPackage(\Laravel\Roster\Enums\Packages::INERTIA_SVELTE))
  10. - IMPORTANT: Activate `inertia-svelte-development` when working with Inertia Svelte client-side patterns.
  11. @endif
  12. @if($assist->inertia()->gte('2.0.0'))
  13. # Inertia v2
  14. - Use all Inertia features from v1 and v2. Check the documentation before making changes to ensure the correct approach.
  15. - New features: deferred props, infinite scrolling (merging props + `WhenVisible`), lazy loading on scroll, polling, prefetching.
  16. - When using deferred props, add an empty state with a pulsing or animated skeleton.
  17. @else
  18. # Inertia v1
  19. - Inertia v1 does not support the following v2 features: deferred props, infinite scrolling (merging props + `WhenVisible`), lazy loading on scroll, polling, or prefetching. Do not use these.
  20. @endif