Skip to content
Advertisement

Livewire encountered corrupt data when trying to hydrate the … component

I am getting the following error and am a bit lost on it:

Livewire encountered corrupt data when trying to hydrate the … component. Ensure that the [name, id, data] of the Livewire component wasn’t tampered with between requests

Situation is as follows: Livewire 2.x, Laravel 7.x, Component Controller fetches data from 3 MySQL Stored Procedures and processes it. Component Blade is a pretty basic blade with foreach loop. I am using the wire:init feature so that the component is not blocking the page load. It contains a custom-built pagination. When switching to the second page of data, this error occurs. It did not error out while on Livewire 1.x.

Has anyone any idea on how to tackle this problem? The error itself does not speak much to me. Any additional info required?

Thank you in advance, appreciate any help!

Advertisement

Answer

In my case the solution was to make a public property protected and pass it to the blade manually, so it was excluded from Livewire’s auto-handling under the hood.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement