shez1983's avatar

livewire 4 - cant get the 2 way reactivity?

So I have a component, with Class and view separate. in class on mount i do

$c. = Model::query()...

and use that in view just fine.

The issue is if i do .. nothing happens, if i submit a form, it just refreshes the page?

I have created a new LARAVEL install with livewire.. i tried adding @livewireScripts as those were missing and no luck..

[I do have a livewire3 app which is working fine, and i cant see any major diff between that and this, apart from in composer.json where this new app explicitly requires livewire.. wheras in the old one i just see livewire/volt entry, and yes i have tried to duplicate that in my new app.. [

also initially i created the new livewire pages:: (with anon class at the top, view at bottom ,kinda like vueJS setup) and that didnt work either..

0 likes
1 reply
shez1983's avatar

the issue was that i had a style tag... (when i converted the single annon to an older syntax with class and view separate, I added style tag at the top of view.. and that was messing up..

altho i am not 100% sure why my example code wasnt working... i am just happy I got it working, was driving me nuts

Please or to participate in this conversation.