Skip to content

Commit

Permalink
Add return type to useHoistedRoutes() function (#60)
Browse files Browse the repository at this point in the history
* Add return type to useHoistedRoutes function
  • Loading branch information
ofrogon committed Aug 24, 2023
1 parent 6a0f50c commit ff7c250
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-router/src/useHoistedRoutes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function getAllRoutePaths(route: Route) {
return !isNil(current) ? [current] : [];
}

export function useHoistedRoutes(routes: RootRoute[], wrapManagedRoutes: (routes: Route[]) => Route, { allowedPaths }: UseHoistedRoutesOptions = {}) {
export function useHoistedRoutes(routes: RootRoute[], wrapManagedRoutes: (routes: Route[]) => Route, { allowedPaths }: UseHoistedRoutesOptions = {}): Route[] {
// Hack to reuse the same array reference through re-renders.
const [memoizedAllowedPaths] = useState(allowedPaths);

Expand Down

0 comments on commit ff7c250

Please sign in to comment.