docs(IonReactRouter): use updated param names

This commit is contained in:
Maria Hutt
2025-06-16 11:36:40 -07:00
parent 2656e98490
commit 10bb889dc3

View File

@ -39,8 +39,8 @@ const RouterContent = ({ children }: PropsWithChildren<{}>) => {
* primarily for `IonRouter` to manage Ionic-specific UI updates and * primarily for `IonRouter` to manage Ionic-specific UI updates and
* navigation stack behavior. * navigation stack behavior.
* *
* @param location The current browser history location object. * @param loc The current browser history location object.
* @param action The type of navigation action ('PUSH', 'POP', or * @param act The type of navigation action ('PUSH', 'POP', or
* 'REPLACE'). * 'REPLACE').
*/ */
const handleHistoryChange = useCallback((loc: HistoryLocation, act: HistoryAction) => { const handleHistoryChange = useCallback((loc: HistoryLocation, act: HistoryAction) => {
@ -53,11 +53,7 @@ const RouterContent = ({ children }: PropsWithChildren<{}>) => {
handleHistoryChange(location, navigationType); handleHistoryChange(location, navigationType);
}, [location, navigationType, handleHistoryChange]); }, [location, navigationType, handleHistoryChange]);
return ( return <IonRouter registerHistoryListener={registerHistoryListener}>{children}</IonRouter>;
<IonRouter registerHistoryListener={registerHistoryListener}>
{children}
</IonRouter>
);
}; };
export const IonReactRouter = ({ children, ...browserRouterProps }: PropsWithChildren<BrowserRouterProps>) => { export const IonReactRouter = ({ children, ...browserRouterProps }: PropsWithChildren<BrowserRouterProps>) => {