Back

note to self: never use livewire on client sites. Maybe for personal new sites is okay but don't throw it on legacy stuff. You will get white hairs

3

452

Hi. Can you explain why? Why would you not use it for client work?

2

137

For me it was more than one reason. I had to build a pretty long "form" wizard with many steps and many columns and I decided to build a form builder in livewire. Firstly I tried to ad the livewire component inside a normal blade page.
This dind't work and whatever I did I got the issues with "snapshot not found for id x".
Then I tried full page components but then they didn't support blade layots so I had to duplicate my layouts.
Then i did the error to use the single input field as a component (similarly to vue.js) and this forced me to use events to update data from children to parent.
Then after filling the components I got errors with interactivity again, some filelds had to be conditionally displayed ( user chosen what kind of entity they are company/person and company fields where displayed accordingly). This triggered errors again and slowdowns.
Then i did the error to use the single input field as a component (similarly to vue and this forced me to use events to upload ....

1

32

In response to @danielpetrica

to use events to update data between the children input field and the parent form container containing the logic.
Then I had problems with fields being live, as this would slow down the site and occasionally trigger the snapshot error again.
I disabled liveness for all except the entity type selected from above. This solves my snapshot issue, but now I have a problem with saving, not all input changes were recognized. In the end, I had to not use livewire to select, but use "legacy" post forms to collect the fields and send the data to my endpoint.
Also, I never got the livewire form validation and errors to work correctly.
Passing to the legacy post solved my problems.

I need to specify that this was a legacy bootstrap site and probably an issue occurred because the bootstrap / jQuery were changing some DOM of the page.

I used livewire on some smaller sites, and it was OK, but they had very shorter input forms to handle.

27

  • No matching results...
  • Searching...

/ 1000