Published by oedotme about 1 year ago
Changelog: https://github.com/oedotme/generouted/compare/v1.15.8...v1.15.9
Published by oedotme about 1 year ago
Changelog: https://github.com/oedotme/generouted/compare/v1.15.7...v1.15.8
Published by oedotme about 1 year ago
Changelog: https://github.com/oedotme/generouted/compare/v1.15.6...v1.15.7
Published by oedotme about 1 year ago
Changelog: https://github.com/oedotme/generouted/compare/v1.15.5...v1.15.6
Published by oedotme about 1 year ago
Changelog: https://github.com/oedotme/generouted/compare/v1.15.4...v1.15.5
Published by oedotme about 1 year ago
Changelog: https://github.com/oedotme/generouted/compare/v1.15.3...v1.15.4
Published by oedotme about 1 year ago
Changelog: https://github.com/oedotme/generouted/compare/v1.15.2...v1.15.3
Published by oedotme over 1 year ago
Changelog: https://github.com/oedotme/generouted/compare/v1.15.1...v1.15.2
Published by oedotme over 1 year ago
Changelog: https://github.com/oedotme/generouted/compare/v1.15.0...v1.15.1
Published by oedotme over 1 year ago
Introduce route-based and app-level Pending
component as a Suspense
fallback for both @generouted/react-router
and @generouted/solid-router
export const Pending = () => <div>Loading...</div>
For @generouted/solid-router
, now the routes
tree/object has the src/pages/_app.tsx
as the root route and all the routes render as children like the current implement for @generouted/react-router
.
You need to make two changes only at src/pages/_app.tsx
for this new update:
<Outlet />
component from @solidjs/router
instead of {props.children}
<Modals />
component explicitly, it was included previously at the exported <Routes />
component// src/pages/_app.tsx
import { Outlet } from '@solidjs/router'
import { Modals } from '@generouted/solid-router'
import { useModals } from '../router'
export default function App() {
const modals = useModals()
return (
<section>
<header>
<nav>...</nav>
<button onClick={() => modals.open('/login')}>Open modal</button>
</header>
<main>
<Outlet />
</main>
<Modals />
</section>
)
}
Changelog: https://github.com/oedotme/generouted/compare/v1.14.0...v1.15.0
Published by oedotme over 1 year ago
You can now export an app level error boundary Catch
component from src/pages/_app.tsx
with the following integrations:
@generouted/react-router
, @generouted/react-router/lazy
// src/pages/_app.tsx
export const Catch = () => <div>...</div>
@generouted/solid-router
, @generouted/solid-router/lazy
// src/pages/_app.tsx
export const Catch = (props: { error: Error; reset: () => void }) => <div>...</div>
If you're using the generatePreservedRoutes
directly from the core functions or through a custom integration you should now access the default
export explicitly:
const preservedRoutes = generatePreservedRoutes(PRESERVED)
-const App = preservedRoutes?.['_app'] || Outlet
-const NotFound = preservedRoutes?.['404'] || Fragment
+const App = preservedRoutes?.['_app']?.default || Outlet
+const NotFound = preservedRoutes?.['404']?.default || Fragment
Changelog: https://github.com/oedotme/generouted/compare/v1.13.7...v1.14.0
Published by oedotme over 1 year ago
Catch
component with error boundary for Solid integrationsexport const Catch = (props: { error: Error; reset: () => void }) => <div>...</div>
Changelog: https://github.com/oedotme/generouted/compare/v1.13.6...v1.13.7
Published by oedotme over 1 year ago
Changelog: https://github.com/oedotme/generouted/compare/v1.13.5...v1.13.6
Published by oedotme over 1 year ago
Changelog: https://github.com/oedotme/generouted/compare/v1.13.4...v1.13.5
Published by oedotme over 1 year ago
Changelog: https://github.com/oedotme/generouted/compare/v1.13.3...v1.13.4
Published by oedotme over 1 year ago
Changelog: https://github.com/oedotme/generouted/compare/v1.13.2...v1.13.3
Published by oedotme over 1 year ago
Changelog: https://github.com/oedotme/generouted/compare/v1.13.1...v1.13.2
Published by oedotme over 1 year ago
Changelog: https://github.com/oedotme/generouted/compare/v1.13.0...v1.13.1
Published by oedotme over 1 year ago
src/pages
in nested directory such as client/src/pages
or apps/dashboard/src/pages
router.ts
file with prettier by default if prettier is installedsource
is now an object instead of string to accept both routes
and modals
patternsoutput
is now the full output file path instead of only file name// default values when using `generouted()` plugin with no options (recommended)
{
source: { routes: './src/pages/**/[\\w[-]*.{jsx,tsx}', modals: './src/pages/**/[+]*.{jsx,tsx}' },
output: './src/router.ts',
format: true,
}
Changelog: https://github.com/oedotme/generouted/compare/v1.12.9...v1.13.0
Published by oedotme over 1 year ago
Changelog: https://github.com/oedotme/generouted/compare/v1.12.8...v1.12.9