You cannot. The data is shared with the client so dont put anything secret in there
How to hide livewire wire:snapshot aka hydration from DOM
Hi guys, on the Livewire documentation for wire:snapshot they say this:
We will refer to the process of taking the snapshot as "dehydration" and the process of re-creating a component from a snapshot as "hydration".
#Dehydrating When Livewire dehydrates a server-side component, it does two things:
Renders the component's template to HTML Creates a JSON snapshot of the component
#Embedding the snapshot in the HTML
When a component is first rendered, Livewire stores the snapshot as JSON inside an HTML attribute called wire:snapshot. This way, Livewire's JavaScript core can extract the JSON and turn it into a run-time object:
< div wire:id="..." wire:snapshot="{ state: {...}, memo: {...} }" > Count: 1 < button wire:click="increment" >+< /button > < /div >
How to hide wire:snapshot when I run npm run dev or npm run build on Laravel v10.41.0 and Livewire v3 ?
Please or to participate in this conversation.