feat(rhf-plugin): implement new plugin#258
Merged
Merged
Conversation
New @rozenite/react-hook-form-plugin package that integrates with react-hook-form's control API to expose form state to the Rozenite DevTools panel in real time. - Adapts data extraction logic from @hookform/devtools (nestToFlat, proxyToObject, control._names.mount) to work with plugin-bridge instead of window.postMessage - Supports multiple simultaneous forms via form ID - DevTools panel shows field values, dirty/touched/error state, and form-level status (isValid, submitCount, etc.) with live search - Playground demo screen with two forms (profile + login) to test
…ccessful in RHF panel
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
5e3b9cf to
374c687
Compare
374c687 to
fa72138
Compare
fa72138 to
16f4c15
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@rozenite/react-hook-form-plugin— a new Rozenite plugin that exposes React Hook Form state to the DevTools panel in real timeuseRozeniteRHFPlugin({ control, id? })subscribes to form state viauseFormState+useWatch, flattens nested fields using adapted logic from@hookform/devtools, and streams snapshots overplugin-bridgeunmountevent on cleanup)addressfields, login) to exercise all featuresTest plan
addressgroup in the DevTools panel