<x-dynamic-component :component="$getFieldWrapperView()" :field="$field"> <div x-data="{ state: $wire.$entangle('{{ $getStatePath() }}') }" > <input x-model="state" x-ref="test_input" x-init="await doSomething();" /> </div> <script> async function doSomething() { // How can I change the state from inside here? } </script></x-dynamic-component>