Zum Inhalt springen
Yuva roadmap hooksMenü

Yuva roadmap hooks

React hooks over the useyuva headless client for a public roadmap board: the board and its stage counts, the ideas of a stage by top votes or newest with a title search, voting and suggesting an idea. Built on the discussion hooks. Labels with English defaults.

Loading

  • Loading

Die Vorschau läuft mit Beispieldaten. Sie braucht weder Netzwerk noch Kanal.

Installation

Führen Sie das in einem shadcn-Projekt aus. Die Dateien werden in Ihren eigenen Code kopiert.

Shell
npx shadcn@latest add https://useyuva.com/r/use-yuva-roadmap.json

Verwendung

tsx
import { useIdeas, useRoadmap } from "@/hooks/use-yuva-roadmap"

const { board } = useRoadmap()
const { ideas, vote } = useIdeas("planned", "top")

Props

RoadmapResult

PropTyp
boardClientRoadmap | null
loadingboolean
errorunknown
reload() => Promise<void>

IdeasResult

PropTyp
ideasDiscussion[]
loadingboolean
errorunknown
hasMoreboolean
loadMore() => Promise<void>
reload() => Promise<void>
suggest(input: IdeaInput) => Promise<Discussion>
vote(idea: Discussion) => Promise<void>

Beschriftungen

Die Beschriftungen stehen auf der Seite Yuva roadmap.

Abhängigkeiten

Die Installation dieses Elements fügt auch Folgendes hinzu.

Weitere Yuva-Elemente

npm-Pakete