add test case covering islands that return null (#1203)

Just a small addition to my previous PR. It wasn't obvious for me that
PR #1172 also fixed #1129. I guess that issue should be covered by a
separate test
This commit is contained in:
azerum
2023-05-25 09:40:49 +10:00
committed by GitHub
parent e86a126c0a
commit 1a456444e4
4 changed files with 77 additions and 38 deletions
+13
View File
@@ -0,0 +1,13 @@
import { useEffect } from "preact/hooks";
export default function ReturningNull() {
useEffect(() => {
const p = document.createElement("p");
p.textContent = "Hello, null!";
p.className = "added-by-use-effect";
document.body.appendChild(p);
}, []);
return null;
}