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
14 lines
288 B
TypeScript
14 lines
288 B
TypeScript
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;
|
|
}
|