Module: Phlex::Reactive::Component::Lazy
- Extended by:
- ActiveSupport::Concern
- Included in:
- Phlex::Reactive::Component
- Defined in:
- lib/phlex/reactive/component/lazy.rb
Overview
Lazy initial mount (issue #165): a reactive_lazy component's FIRST
(page-embedded) render emits a placeholder SHELL — the root id, the
generic controller, the pending markers, and a defer token ON the root
— and the client fetches the real content through the same defer
machinery on connect (the Livewire #[Lazy] shape).
Lazy applies ONLY to the initial mount. Every render that goes through the reactive machinery — an action reply's self-replace, a broadcast, the defer endpoint/job, the class stream builders — runs inside Defer.with_real_render, so it renders the REAL template. Anything else would make an action on a lazy component cost two round trips.