Skip to content
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

The preview runs on sample data. It needs no network and no channel.

Installation

Run this in a shadcn project. The files are copied into your own code.

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

Usage

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

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

Props

RoadmapResult

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

IdeasResult

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

Labels

The labels are listed on Yuva roadmap.

Dependencies

Installing this item also adds the following.

Other Yuva items

npm packages