From 28cb8a8c43f21b38ce80df56901c924375fe813f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Wed, 30 Dec 2020 23:14:22 +0100 Subject: [PATCH 1/3] Updated CDN link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 63edb30..95b528b 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ Simply include the JS file in your layout (**after Livewire's scripts**) and the ```html @livewireScripts - + ``` ## Performance From c95d5ec510dc7945184a6ccff4699502e7e0ce93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Wed, 30 Dec 2020 23:17:22 +0100 Subject: [PATCH 2/3] Better wording --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 95b528b..5736ea3 100644 --- a/README.md +++ b/README.md @@ -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
From ec2ca8b4a8dd0d5ca66c248f4c17d7daa371cb66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Wed, 30 Dec 2020 23:18:27 +0100 Subject: [PATCH 3/3] Improved npm call --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5736ea3..c4e1b87 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ To tell Livewire that **the element itself plus its children** should always be ### npm dependency Install the package: ``` -npm install --dev leanadmin@wire-replace +npm install --dev @leanadmin/wire-replace ``` Register the directive in your `app.js` file: