reactive() vs. live(). what`s the difference?
I did not find an answer to this question in the documentation. It turns out that instead of reactive(), I can always use live()?
3 Replies
There is no difference. Reactive simply calls live(). It was changed to reflect the new naming conventions in LW3. But reactive was left in to keep from breaking apps.
thank you very much for your answer! the new method confused me a little, since previously there was only one reactive()
In LW2, there wasn't really a word for "live", because wire:model was "live" (or in Filament terminology "reactive") by default, and you had to wire:model.defer to make it deferred (or "lazy"). In LW3, wire:modal is now lazy by default, and you have to add the new directive 'live', like wire:model.live to make it "reactive".
So Filament adopts the new terminology for 'live" in v3, but leaves reactive() for backward compat.