Respect's avatar

why wire wire-elements/livewire-strict package not working in livewire v4

  • hello friends thanks for helping why wire wire-elements/livewire-strict package not working in livewire v4 and is there alternative
  • it's not throwing any exeption if try to update any property from client side (nothing happen like in v3)
https://github.com/wire-elements/livewire-strict

AppServiceProvider.php

<?php

namespace App\Providers;
use WireElements\LivewireStrict\LivewireStrict;

class AppServiceProvider extends ServiceProvider
{
    /**
     * Register any application services.
     */
    public function register(): void
    {
        LivewireStrict::lockProperties();
    }

    /**
     * Bootstrap any application services.
     */
   
}

0 likes
2 replies
imrandevbd's avatar

Livewire v4 changed how property hydration/updates work internally, and wire-elements/livewire-strict hasn’t been updated to hook into those changes. In v3 it relied on middleware/hooks that simply don’t fire the same way anymore in v4, so lockProperties() becomes a no-op.

Respect's avatar

oh thanks for answer , is there any alternative way ?

Please or to participate in this conversation.