Repository navigation
Add WebMCP tools
This release brings WebMCP support to Reactuse, introduces animated collapsible elements, expands test coverage, and improves the documentation experience.
Features
useWebMCP— connects a React component to the browser WebMCP API. A tool can be registered automatically on mount or controlled manually throughregisterandunregister, while registration state and errors remain available to the UI. The latestexecutecallback is always used without recreating the tool.createWebMCP— provides a standalone registry for exposing WebMCP tools outside the React lifecycle. Multiple named tools can coexist, duplicate registrations are safely replaced, and tools can be removed individually or cleared together.useCollapse— handles the DOM measurements and height transitions needed for expandable content. It works with either an existing target or a returned ref and providesopen,close, andtogglecontrols alongside configurable duration, easing, and transition callbacks.
Changes
- Published a WebMCP guide with API documentation and interactive examples.
- Added dedicated test suites for
useWebMCP,createWebMCP, anduseCollapse. - Covered additional edge cases in
useClipboard,useContextMenu,useControllableState, anduseDeviceList. - Refined hook demos and regenerated the function documentation.
- Updated development dependencies and supporting tooling.