useRoutePath

useRoutePath

The path of the skill this component renders in, or null at the agent level.

import { useRoutePath } from "curb";

function useRoutePath(): string | null;

Example

function WhereAmI() {
  const path = useRoutePath();
  return path === "/claims" ? <Text>You are in the claims skill.</Text> : null;
}

Version history

VersionChanges
v0.1.2useRoutePath introduced