From 7d8204a0a7e5ca1683137db062e2ad7c96b2ae09 Mon Sep 17 00:00:00 2001 From: Sean Perkins Date: Fri, 30 Jun 2023 16:11:43 -0400 Subject: [PATCH] chore: document IonReactRouter usage with BrowserRouter --- packages/react-router/src/ReactRouter/IonReactRouter.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/react-router/src/ReactRouter/IonReactRouter.tsx b/packages/react-router/src/ReactRouter/IonReactRouter.tsx index f366705415..40208abe15 100644 --- a/packages/react-router/src/ReactRouter/IonReactRouter.tsx +++ b/packages/react-router/src/ReactRouter/IonReactRouter.tsx @@ -9,9 +9,11 @@ import { IonRouter } from './IonRouter'; * Wrapper around react-router-dom's BrowserRouter that provides a context for IonRouterOutlet. * Ionic developers should use IonReactRouter instead of BrowserRouter when using React Router. */ -export function IonReactRouter({ children, ...props }: PropsWithChildren) { +export function IonReactRouter({ children }: PropsWithChildren) { + // BrowserRouter is used so that the route state is kept in sync with the browser history. + // This reflects the current route in the URL. return ( - + {children} );