mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-16 01:52:19 +08:00
docs(IonReactRouter): use updated param names
This commit is contained in:
@ -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>) => {
|
||||||
|
Reference in New Issue
Block a user