Caleb Porzio 3 tahun lalu
induk
melakukan
823bd90845
1 mengubah file dengan 15 tambahan dan 1 penghapusan
  1. 15 1
      packages/docs/src/en/upgrade-guide.md

+ 15 - 1
packages/docs/src/en/upgrade-guide.md

@@ -307,7 +307,21 @@ Alpine will no longer officially support Internet Explorer 11. If you need suppo
 
 
 `x-html` was a seldom used directive in Alpine V2. In an effort to keep the API slimmed down to only valued features, V3 is removing this directive.
 `x-html` was a seldom used directive in Alpine V2. In an effort to keep the API slimmed down to only valued features, V3 is removing this directive.
 
 
-However, using V3's new custom directive API, it's trivial to reintroduce this functionality using the following polyfill:
+You can reproduce this exact functionality using `x-effect` like so:
+
+```html
+<!-- 🚫 Before -->
+<div x-data="{ someHtml: '<h1>...</h1>' }">
+    <div x-html="someHtml">
+</div>
+
+<!-- ✅ After -->
+<div x-data="{ someHtml: '<h1>...</h1>' }">
+    <div x-effect="$el.innerHTML = someHtml">
+</div>
+```
+
+Or, using V3's new custom directive API, it's trivial to polyfill this directive:
 
 
 ```html
 ```html
 <!-- 🚫 Before -->
 <!-- 🚫 Before -->