React adapter: update useCalendar for kernel + module API

Aberta
#36 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
35/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Pouca atividade
Stack de tecnologia
react, typescript
Domínio
frontend

Direção de pesquisa

Start by reading the parent issue #25 and the blocking issues #29–#34 to understand the kernel and module API this adapter depends on. Then inspect the @tanstack/react-time hook and tests, along with the @tanstack/solid-time adapter for the expected reactive shape. Done means the React hook exposes the specified API reactively, the Solid adapter mirrors its shape, and all existing React adapter tests pass.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

enhancement

Parent

https://github.com/TanStack/time/issues/25

What to build

Update `@tanstack/react-time`'s `useCalendar` hook to consume the new kernel + module API. The hook remains a thin reactive binding — no domain logic lives here. It instantiates the kernel, subscribes to the store via `@tanstack/react-store`, and exposes reactive selectors so components re-render only when the data they consume changes.

Acceptance criteria

  • `useCalendar({ modules, strategy, events, resources })` instantiates a kernel and returns its full API reactively
  • Components subscribed to `days` re-render when the projection changes; components subscribed only to `viewMode` do not re-render on unrelated event changes
  • `strategy: 'client' | 'server'` is accepted and forwarded to the kernel
  • The hook re-exports all Calendar product actions (`addEvent`, `editEvent`, `removeEvent`, `navigate`, `undo`, `redo`, etc.) as stable references
  • `getEventProps(event)` and `getUnavailableRanges(date)` are accessible from the hook return value
  • The Solid adapter (`@tanstack/solid-time`) mirrors the hook shape using Solid's reactive primitives, confirming the core is framework-agnostic
  • All existing `@tanstack/react-time` tests are updated and passing

Blocked by

https://github.com/TanStack/time/issues/29
https://github.com/TanStack/time/issues/30
https://github.com/TanStack/time/issues/31
https://github.com/TanStack/time/issues/32
https://github.com/TanStack/time/issues/33
https://github.com/TanStack/time/issues/34

Linguagem predominante
TypeScript
Estrelas
620
Forks
6
Métricas de merge de PRs
Nenhum PR com merge em 30d

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de TanStack/time

Todas as issues de TanStack/time

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.