Skip to main content

Function: useCreateTag()

useCreateTag(): UseMutationResult<UserTag, Error, CreateTagInput, unknown>

Defined in: web/lib/hooks/use-tags.ts:435

Mutation hook for creating a new tag.

Returns

UseMutationResult<UserTag, Error, CreateTagInput, unknown>

Mutation object for creating tags

Remarks

Creates a tag in the user's PDS. Tags are normalized for consistency (lowercase, hyphen-separated) while preserving the display form.

Example

const createTag = useCreateTag();

const handleAddTag = async (displayForm: string) => {
await createTag.mutateAsync({
eprintUri,
displayForm,
});
};