Files
v10/packages/react
38215df70b refactor(react): create shared component factory for reusable architecture
- Extract toConnectedComponent into shared utility with full TypeScript generics
- Create src/utils/component-factory.tsx with generic types:
  - StateHookFn, PropsHookFn, RenderFn for type safety
  - Generic toConnectedComponent factory function
  - ConnectedComponent type helper for inference
- Update PlayButton and MuteButton to use shared factory
- Remove duplicate toConnectedComponent implementations
- Add proper JSDoc documentation for the component factory pattern
- Fix TypeScript indexing issues with Record<string, any> typing
- Maintains full type safety while eliminating code duplication

This follows Adobe React Spectrum and Base UI architectural patterns for
maximum reusability and extensibility across components.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-08 17:15:40 -07:00
..