Published by oedotme over 1 year ago
Changelog: https://github.com/oedotme/generouted/compare/v1.12.7...v1.12.8
Published by oedotme over 1 year ago
Changelog: https://github.com/oedotme/generouted/compare/v1.12.6...v1.12.7
Published by oedotme over 1 year ago
Changelog: https://github.com/oedotme/generouted/compare/v1.12.5...v1.12.6
Published by oedotme over 1 year ago
Changelog: https://github.com/oedotme/generouted/compare/v1.12.4...v1.12.5
Published by oedotme over 1 year ago
Changelog: https://github.com/oedotme/generouted/compare/v1.12.3...v1.12.4
Published by oedotme over 1 year ago
New generouted
explorer - interactive playground for file-based routing.
You can run it online via StackBlitz
Changelog: https://github.com/oedotme/generouted/compare/v1.12.2...v1.12.3
Published by oedotme over 1 year ago
Changelog: https://github.com/oedotme/generouted/compare/v1.12.0...v1.12.1
Published by oedotme over 1 year ago
Changelog: https://github.com/oedotme/generouted/compare/v1.12.1...v1.12.2
Published by oedotme over 1 year ago
The integrations updated are generouted/react-router
and generouted/solid-router
. Now each integration is bundled and exported via its package namespace that was used originally only for the plugin and internal client exports.
The setup should be easier now, only one package to install and use @generouted/react-router
or @generouted/solid-router
. Installing the generouted
package manually is no longer necessary:
-pnpm add @generouted/react-router generouted react-router-dom
+pnpm add @generouted/react-router react-router-dom
The plugin is now accessible via /plugin
and the Routes
via the package index:
-import generouted from '@generouted/react-router'
+import generouted from '@generouted/react-router/plugin'
-import { Routes } from 'generouted/react-router'
+import { Routes } from '@generouted/react-router'
Same applies to the @generouted/solid-router
integration.
Changelog: https://github.com/oedotme/generouted/compare/v1.11.7...v1.12.0
Published by oedotme over 1 year ago
Changelog: https://github.com/oedotme/generouted/compare/v1.11.6...v1.11.7
Published by oedotme over 1 year ago
generouted/react-router-lazy
integration is now using React Router's new lazy
API + Component/ErrorBoundary
which is now used also in generouted/react-router
.
The new lazy
API replaces the manual use of React.lazy
and React.Suspense
w/ fallback={null}
which was causing a page flash while loading the page module, the page transition seems to work fine now.
Changelog: https://github.com/oedotme/generouted/compare/v1.11.5...v1.11.6
Published by oedotme over 1 year ago
Changelog: https://github.com/oedotme/generouted/compare/v1.11.4...v1.11.5
Published by oedotme over 1 year ago
Changelog: https://github.com/oedotme/generouted/compare/v1.11.3...v1.11.4
Published by oedotme over 1 year ago
Changelog: https://github.com/oedotme/generouted/compare/v1.11.2...v1.11.3
Published by oedotme over 1 year ago
Type-safe file-based global modals for Solid Router that works with the current generouted
conventions
You can create a modal by prefixing a route file-name with +
within src/pages/**
, think of it as an extra route -- as the modal overlays the current route: src/pages/+login.tsx
or src/pages/checkout/+step-1.tsx
{ replace: true }
useModals
can be used to navigate to a modal and it's exported from routes.gen.tsx
. The hook returns two methods, modals.open(path, options?)
and modals.close(options?)
options
is the same Solid Router useNavigate > navigate
options
, with an optional at
prop added to navigate to another route (that's also type-safe!) while opening/closing a modal.
Check out the plugin readme for getting started and usage examples.
Changelog: https://github.com/oedotme/generouted/compare/v1.11.1...v1.11.2
Published by oedotme over 1 year ago
Changelog: https://github.com/oedotme/generouted/compare/v1.11.0...v1.11.1
Published by oedotme over 1 year ago
New plugin added to generate routes types for Solid Router with generouted
conventions. The output is saved by default at src/router.ts
and gets updated by the add/change/delete at src/pages/*
.
It provides auto-completion for A
, useNavigate
, useParams
and more exported from src/router.ts
Check the plugin readme for to get started guide and usage examples.
Changelog: https://github.com/oedotme/generouted/compare/v1.10.0...v1.11.0
Published by oedotme over 1 year ago
Two integrations were added to provide non-lazy/non-code-splitting strategy for the following routers and set as default:
react-router-dom
@solidjs/router
Now the imports for the routers mentioned above provide the non-lazy Routes
by default:
generouted/react-router
generouted/solid-router
To access the equivalent lazy-loaded Routes
you need to add -lazy
to the integration import:
generouted/react-router-lazy
generouted/solid-router-lazy
This change will enable switching between both lazy and non-lazy strategies while having the same features and conventions.
Changelog: https://github.com/oedotme/generouted/compare/v1.9.0...v1.10.0
Published by oedotme over 1 year ago
React Router plugin generates now only types and type-safe components/hooks/utils:
src/routes.gen.tsx
and added src/router.ts
Routes
from generouted/react-router
instead of src/routes.gen.tsx
src/router.ts
instead of src/routes.gen.tsx
Modals
from generouted/react-router
instead of src/routes.gen.tsx
useModals
from src/router.ts
as other hooksChangelog: https://github.com/oedotme/generouted/compare/v1.8.0...v1.9.0
Published by oedotme over 1 year ago
Getting started with type-safe global modals with React Router here https://github.com/oedotme/generouted/tree/main/plugins/react-router#type-safe-global-modals
Changelog: https://github.com/oedotme/generouted/compare/v1.7.20...v1.8.0