Expand description
Page components: a component whose view renders the whole document.
An embedded component is mounted from a page template with {{ livewire(..) }}. A page
component has no page template: its own .livewire view extends the application layout, and the
route answers with the component’s rendered markup.
{# resources/views/livewire/post-browser.livewire #}
{% extends "layouts.app" %}
{% block content %}<h1>Posts</h1>{% endblock %}The route then mounts it exactly as a page would:
let html = livewire::page::render_page(®istry, "post-browser", Params::default())?;§What a component gains, and does not
The mount lifecycle, props, and the update endpoint are the same as an embedded component’s; only the surrounding document comes from the component. Route parameters and persistent middleware belong to the application’s routing layer, which passes them as props.
Functions§
- render_
page - Mounts
nameas a page and returns the markup the route answers with.