Livewire render whole html instead of just updating part when I update public variable.
Hello,
In Live, When we update any property, it call update method.
When it return response, does it return whole html ?
I mean instead of ust updating particular part, does it return whole componenet ?
At present when I filter on particular part in component, it update $this->jobs private property and render output, when I check update method in network tabl return 200 within a second, but output is taking time to render in screen. When I check response, I see around 1MB html which seems whole my compoent.
the view that you render in the component is sent to the client. The livewire client then makes Dom changes to the bits that are different
You should also be aware that ALL public properties are shared with the client (in the network response) so dont make loads of data shared with the client
Thank you for your responses.
So below is currrent scenario, based on that, it would be nice if you suggest me what I should do.
Scenario : Jobs loads first time via render function.
User than change city and distance. I am calling laravel method when they change that.
Livewire method update $this->jobs private property which contain all the updated jobs.
In response, network tab return 200 ok within a second, but initiator tab's livewire.js?id=5d8beb2e:4192 keep increasing size till 1-2MB and take 4-5 seconds to render.