Vai al contenuto
Yuva roadmap hooksMenu

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

L'anteprima usa dati di esempio. Non richiede rete né canale.

Installazione

Esegui questo in un progetto shadcn. I file vengono copiati nel tuo codice.

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

Utilizzo

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

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

Props

RoadmapResult

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

IdeasResult

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

Etichette

Le etichette sono elencate in Yuva roadmap.

Dipendenze

Installare questo elemento aggiunge anche quanto segue.

Altri elementi Yuva

Pacchetti npm