跳到內容
Yuva roadmap hooks選單

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

預覽使用範例資料執行,不需要網路,也不需要頻道。

安裝

在 shadcn 專案中執行。檔案會複製到你自己的程式碼裡。

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

用法

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

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

Props

RoadmapResult

Prop類型
boardClientRoadmap | null
loadingboolean
errorunknown
reload() => Promise<void>

IdeasResult

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

標籤

標籤列在 Yuva roadmap 頁面。

相依套件

安裝此項目時還會加入以下內容。

其他 Yuva 項目

npm 套件