Skip to content

use/useSuggestRoute

Overview

Suggests the best matching route for the current path using string similarity against all registered routes.

Methods

  • useSuggestRoute - A hook to suggest a route based on the current route.
  • useSuggestRoutes - A hook that returns the N best matching routes for the current path with similarity scores.

Types

RouteMatch

NameTypeDescription
matchedPathstring
scorenumber

SuggestedRoute

NameTypeDescription
matchedPathstring
routeobject
scorenumber

Source

client/lib/use/useSuggestRoute.js:1

Documents matching: server v3.0.0a1.post1client v3.0.0-alpha.2