Repository: Rezact/Rezact (ts)

Issue:
BUG: Router is not setting title for the '/' route

Pull request description:
fix #66 router not setting root title
fix #66 

Patch:
diff --git a/package.json b/package.json
index 14cd955..a47212a 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@rezact/rezact",
-  "version": "1.0.15-beta.24",
+  "version": "1.0.15-beta.25",
   "type": "module",
   "description": "Intuitive Reactivity, Simplified State. Embrace a modern UI framework that encourages direct data mutations, offers module-level reactivity, and simplifies component design. With Rezact, you get the power of reactivity without the boilerplate. Dive into a seamless development experience tailored for today's web.",
   "main": "index.cjs",
diff --git a/src/components/appRouter.ts b/src/components/appRouter.ts
index 1e7d5ef..42a8c81 100644
--- a/src/components/appRouter.ts
+++ b/src/components/appRouter.ts
@@ -3,7 +3,7 @@ import { nestedRoot, useRouter } from "rezact/router";
 const router = useRouter();
 
 router.addRoute("/404", () => import("./404"));
-router.addRoute("/", () => import("src/components/HomePage"));
+
 router.addRoute(
   "/array-state-persistent-across-route-changes",
   () => import("src/components/HomePageStatePersistsAcrossRouteChanges")
@@ -127,6 +127,11 @@ router.addRoute(
 );
 
 const routes = [
+  {
+    path: "/",
+    component: () => import("src/components/HomePage"),
+    title: "Testing Root Title",
+  },
   {
     path: "/users2",
     component: () => import("src/examples/NestedRoutes/Users"),
diff --git a/src/lib/rezact/router.ts b/src/lib/rezact/router.ts
index af8bf84..28c4be5 100644
--- a/src/lib/rezact/router.ts
+++ b/src/lib/rezact/router.ts
@@ -166,6 +166,7 @@ export class TrieRouter {
     const parts = path.split("/").filter(Boolean);
     let firstPartRootSet = false;
     let currentNode = this.root;
+    if (path === "/") this.root.title = opts.title;
 
     for (let part of parts) {
       if (part.startsWith(":")) {


Test patch:
diff --git a/src/router.test.js b/src/router.test.js
index 756532a..86b0ae7 100644
--- a/src/router.test.js
+++ b/src/router.test.js
@@ -47,6 +47,7 @@ describe("Router Tests Suite", () => {
     expect(allHeaders[0].textContent).toBe("Hello World TEST");
     const routerOutlet = document.getElementById("router-outlet-test");
     expect(routerOutlet.innerHTML).toMatchSnapshot();
+    expect(document.title).toBe("Testing Root Title");
   });
 
   it("Bleeds from previous test state", async () => {
@@ -462,6 +463,8 @@ describe("Router Tests Suite", () => {
         "0. apple On"
       )
     );
+
+    expect(document.title).toBe("Testing Root Title");
   });
 
   it("Navigates to the multiple counter link", async () => {