PHP/Laravel have something similar to this now called Livewire https://laravel-livewire.com/
The author, Caleb Porzio (https://calebporzio.com/), was inspired by Phoenix LiveView to build something something like this for his preferred language/framework.