Skip to content

API reference > @kontsedal/olas-router > RouterAdapter

RouterAdapter type ​

Result of createRouterAdapter(). plugin goes increateRoot({ plugins: [adapter.plugin] }) and provides the three route scopes; Bridge mounts inside the React tree and pushes router state into them on every change.

Signature:

typescript
type RouterAdapter = {
  readonly plugin: OlasPlugin;
  readonly Bridge: (props: {
    params: Record<string, string | undefined>;
    search?: Record<string, unknown>;
    pathname?: string;
    children?: ReactNode;
  }) => ReactElement | null;
};

References: OlasPlugin

Released under the MIT License.