Aller au contenu

Undocumented Features Found During v4 Upgrade Guide

These features exist in v4 but may need dedicated documentation pages or sections:

High Priority

  1. wire:intersect directive
  2. Full API with all modifiers (.once, .half, .full, .threshold.X, .margin.Xpx)
  3. Usage patterns and examples
  4. Comparison with Alpine's x-intersect
  5. Suggested location: New docs page or section in wire-* directives

  6. data-loading attribute

  7. Automatic addition to elements that trigger requests
  8. Styling examples and use cases
  9. Suggested location: Section in wire-loading.md or actions.md

  10. wire:preserve-scroll modifier

  11. How it works and when to use it
  12. Examples of preventing layout jumps
  13. Suggested location: Actions.md or new wire-preserve-scroll.md

  14. $errors magic property in JavaScript

  15. Full API (.has(), .first(), .all(), etc.)
  16. Integration with Alpine
  17. Suggested location: Forms.md or validation.md

  18. $island() magic action

  19. Calling island renders from templates
  20. Passing modes and options
  21. Suggested location: Islands.md (add a section)

  22. $wire.$intercept() magic

  23. Full API and callback structure
  24. Use cases and examples
  25. Suggested location: JavaScript.md (interceptors section)

  26. JavaScript modules in view-based components

  27. How <script> tags work without @script wrapper
  28. Automatic $wire binding as this
  29. Module caching and performance benefits
  30. Suggested location: Components.md or JavaScript.md

  31. CSP-safe mode restrictions

  32. Complete list of what expressions are not allowed
  33. Migration guide for existing apps
  34. Workarounds and alternatives
  35. Suggested location: New security.md section or dedicated csp.md page

Medium Priority

  1. Slots and attribute forwarding
  2. Complete guide on using slots in components
  3. {{ $attributes }} usage and examples
  4. Suggested location: Components.md

  5. Smart wire:key automatic generation

    • How it works behind the scenes
    • When you still need manual wire:key
    • Suggested location: Nesting.md or components.md
  6. Component namespaces

    • How to use namespaced components
    • Examples: <livewire:pages::dashboard />
    • Suggested location: Components.md
  7. Fragment morph hooks

    • Livewire.hook('fragment.morph', ...) and fragment.morphed
    • When to use vs regular morph hooks
    • Suggested location: JavaScript.md (hooks section)

Existing Docs to Update

  • lazy.md - Already updated with defer and bundle features
  • actions.md - Already updated with async actions
  • islands.md - Already updated with renderIsland/streamIsland
  • components.md - Already updated with convert command
  • wire-sort.md - Already created and documented

Notes

  • Most of these features exist in the codebase but aren't mentioned in user-facing docs
  • Some may be intentionally undocumented for now (beta features)
  • Priority is based on likely user impact and common use cases