Skip to content

feat(store): useMutation hook for react#290

Merged
mihar-22 merged 5 commits intomainfrom
feat/store-mutation-bindings
Jan 6, 2026
Merged

feat(store): useMutation hook for react#290
mihar-22 merged 5 commits intomainfrom
feat/store-mutation-bindings

Conversation

@mihar-22
Copy link
Copy Markdown
Member

@mihar-22 mihar-22 commented Jan 5, 2026

Summary

  • Add useMutation hook for tracking mutation status (pending/success/error)
  • Fix resolveRequests to default key to request name for object configs

refs #228, #229

@vercel
Copy link
Copy Markdown

vercel bot commented Jan 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
vjs-10-demo-html Ready Ready Preview, Comment Jan 6, 2026 1:08pm
vjs-10-demo-next Ready Ready Preview, Comment Jan 6, 2026 1:08pm
vjs-10-demo-react Ready Ready Preview, Comment Jan 6, 2026 1:08pm
vjs-10-website Ready Ready Preview, Comment Jan 6, 2026 1:08pm

@vercel vercel bot temporarily deployed to Preview – vjs-10-demo-react January 5, 2026 08:07 Inactive
@vercel vercel bot temporarily deployed to Preview – vjs-10-demo-html January 5, 2026 08:07 Inactive
@vercel vercel bot temporarily deployed to Preview – vjs-10-demo-next January 5, 2026 08:07 Inactive
@mihar-22 mihar-22 marked this pull request as draft January 5, 2026 12:46
- Add useMutation(store, selector) base hook for tracking mutation status
- Add useMutation to createStore factory result
- Export MutationResult and MutationStatus types
- Fix resolveRequests to default key to request name for object configs
@mihar-22 mihar-22 force-pushed the feat/store-mutation-bindings branch from 95a572e to 2c06c75 Compare January 6, 2026 12:11
@vercel vercel bot temporarily deployed to Preview – vjs-10-website January 6, 2026 12:11 Inactive
@vercel vercel bot temporarily deployed to Preview – vjs-10-demo-html January 6, 2026 12:11 Inactive
@vercel vercel bot temporarily deployed to Preview – vjs-10-demo-react January 6, 2026 12:11 Inactive
@vercel vercel bot temporarily deployed to Preview – vjs-10-demo-next January 6, 2026 12:11 Inactive
@vercel vercel bot temporarily deployed to Preview – vjs-10-website January 6, 2026 12:55 Inactive
@vercel vercel bot temporarily deployed to Preview – vjs-10-demo-html January 6, 2026 12:55 Inactive
@vercel vercel bot temporarily deployed to Preview – vjs-10-demo-react January 6, 2026 12:55 Inactive
@vercel vercel bot temporarily deployed to Preview – vjs-10-demo-next January 6, 2026 12:55 Inactive
useMutation is now a base/advanced hook only. Users import directly:
import { useMutation } from '@videojs/store/react'

This aligns with MutationController in Lit bindings.
- Update Key Decisions: direct name params, discriminated unions, base hooks only
- Mark Phase 4 (Mutation) as done
- Update file structure to show hooks/ directory split
- Update PR strategy with PR #290 details
- Update usage examples with new API
@vercel vercel bot temporarily deployed to Preview – vjs-10-demo-html January 6, 2026 13:08 Inactive
@vercel vercel bot temporarily deployed to Preview – vjs-10-demo-react January 6, 2026 13:08 Inactive
@vercel vercel bot temporarily deployed to Preview – vjs-10-website January 6, 2026 13:08 Inactive
@vercel vercel bot temporarily deployed to Preview – vjs-10-demo-next January 6, 2026 13:08 Inactive
@mihar-22 mihar-22 marked this pull request as ready for review January 6, 2026 13:10
@mihar-22 mihar-22 merged commit ecd4940 into main Jan 6, 2026
7 checks passed
@mihar-22 mihar-22 deleted the feat/store-mutation-bindings branch January 6, 2026 13:10
@mihar-22 mihar-22 mentioned this pull request Jan 6, 2026
6 tasks
@github-actions github-actions bot mentioned this pull request Feb 26, 2026
@github-actions github-actions bot mentioned this pull request Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant