Fix mounted event after initial hydration (#3480)

* trigger queued mounted events immediately after hydrating

* add a playwright test to prevent regressions
This commit is contained in:
Evan Almloff authored and GitHub committed 2025-01-07 19:52:27 -08:00
1 parent d41ab3a756
commit d890cc72ac
8 files changed
+76 -1

No files matched your search

@@ -0,0 +1,10 @@
// @ts-check
const { test, expect } = require("@playwright/test");
test("hydration", async ({ page }) => {
await page.goto("http://localhost:7777");
// Expect the page to contain the pending text.
const main = page.locator("#main");
await expect(main).toContainText("The mounted event was triggered.");
});