1
0
Fork 0
mirror of https://github.com/archtechx/wire-replace.git synced 2025-12-12 07:34:02 +00:00

Better wording

This commit is contained in:
Samuel Štancl 2020-12-30 23:17:22 +01:00 committed by GitHub
parent 28cb8a8c43
commit c95d5ec510
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,12 +24,12 @@ But:
- it's ugly
- it won't work in situations where you display template that you don't have control over (translated templates, rich text added by users, ...)
A better solution is to have a directive that tells Livewire to **always** replace the element. Sort of like an opposite to `wire:ignore`.
## Usage
This package adds two extremely simple directives: `wire:replace` and `wire:replace.self`. Simply use them on elements that you want fully replaced.
You can think if this directive as the opposite of `wire:ignore`. `wire:ignore` tells Livewire to **never** replace the element, and `wire:replace` tells Livewire to **always** replace the elemenet.
To tell Livewire that the element's children should always be replaced:
```html
<div wire:replace>