Releases: oedotme/generouted
v1.12.2
v1.12.1
v1.12.0
Changes
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.
Upgrading
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.
Commits
Changelog: v1.11.7...v1.12.0
v1.11.7
v1.11.6
Changes
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.
Commits
- chore: update packages 61e8a99 by @oedotme
- feat: use react-router lazy w/ the new props 05f3db2 by @oedotme
Changelog: v1.11.5...v1.11.6
v1.11.5
v1.11.4
v1.11.3
v1.11.2
Changes
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
Why
- Type-safe modal opening with the current type-safe navigation
- Makes it super easy for multi-step modals navigation
- Persistent modal opening on refresh
- Works with back/forward actions, can be avoided with
{ replace: true }
API
useModals
can be used to navigate to a modal and it's exported fromroutes.gen.tsx
. The hook returns two methods,modals.open(path, options?)
andmodals.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.
Commits
- docs: reference solid router navigate options f029d77 by @oedotme
- feat: solid type-safe global modals e42f4be by @oedotme
Changelog: v1.11.1...v1.11.2