Navigation
AppShell's navigation helpers allow micro-frontend applications to trigger navigation in the main application.
Overview
How It Works
Usage
import { AppShellProvider, type ShellNavigation } from '@akinon/app-shell';
import { useNavigate } from 'react-router';
const App = () => {
const routerNavigate = useNavigate();
const navigation: ShellNavigation = {
navigate: (payload) => {
routerNavigate(payload.path);
}
};
return (
<AppShellProvider
apps={registeredApps}
data={sharedData}
navigation={navigation}
actions={shellActions}
>
{/* Your shell application */}
</AppShellProvider>
);
};ShellNavigation Type
Property
Type
Description
Implementation Examples
React Router
TanStack Router
With Application ID
Using Navigation (Client Side)
Advanced Usage
Handling External Navigation
Navigation with Query Parameters
Navigation with State
Best Practices
1. Keep Navigation Logic Simple
2. Handle Unknown Paths Gracefully
3. Consider Navigation Timing
Next Steps
Last updated
Was this helpful?

