router-kit 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Router-Kit
2
2
 
3
- A professional React routing library with guards, loaders, and navigation blocking.
3
+ A professional React routing library with guards, loaders, loading components, middlewares, and navigation blocking.
4
4
 
5
- **Version:** 2.0.0 | **License:** MIT
5
+ **Version:** 2.1.0 | **License:** MIT
6
6
 
7
7
  ---
8
8
 
@@ -80,7 +80,7 @@ function App() {
80
80
  ```tsx
81
81
  const authGuard = async () => {
82
82
  const isAuth = await checkAuth();
83
- return isAuth || { redirect: "/login" };
83
+ return isAuth || "/login";
84
84
  };
85
85
 
86
86
  const routes = createRouter([
@@ -134,6 +134,7 @@ const ctx = useOutletContext(); // Outlet context
134
134
  ## 🎭 Outlet (Nested Layouts)
135
135
 
136
136
  ```tsx
137
+ import { useState } from "react";
137
138
  import { Outlet, useOutletContext } from "router-kit";
138
139
 
139
140
  // Parent layout with Outlet
@@ -193,7 +194,6 @@ const routes = createRouter([
193
194
  | ---------------------------------------- | ----------------- |
194
195
  | [Documentation](./docs/DOCUMENTATION.md) | Complete guide |
195
196
  | [API Reference](./docs/API_REFERENCE.md) | Full API docs |
196
- | [Examples](./docs/EXAMPLES.md) | Code examples |
197
197
  | [Architecture](./docs/ARCHITECTURE.md) | Technical details |
198
198
  | [Changelog](./docs/CHANGELOG.md) | Version history |
199
199