useClient

useClient

What the caller’s page said, the client.* values without the prefix. Anyone can edit a link, so it is never proof of identity (Knowing the caller).

import { useClient } from "curb";

function useClient(): ClientInfo;

Example

function PageTopic() {
  const { topic } = useClient();
  return topic ? <Text>The caller came from the page about {topic}.</Text> : null;
}

Version history

VersionChanges
v1.4.33useClient introduced