Skip to content

Lenses docs #1153

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Jun 9, 2025
Merged

Lenses docs #1153

merged 15 commits into from
Jun 9, 2025

Conversation

aspirisen
Copy link
Contributor

@aspirisen aspirisen commented Jun 7, 2025

Create docs for https://github.com/react-hook-form/lenses package

close #1154

aspirisen added 9 commits June 7, 2025 16:49
…usage, addressing common challenges in managing complex forms in React. Updated sections include type-safe field access, component reusability, and prop drilling issues.
…d removing outdated examples. Added clarity to the motivation and core operations sections, while optimizing the structure for better readability.
…on core types, hooks, and lens operations. Included detailed examples for `useLens`, `reflect`, and `interop` methods, improving clarity and usability for developers working with React Hook Form integration.
…cy in examples. Updated sections on core types, hooks, and lens operations, ensuring type-safe usage and improved readability for developers integrating with React Hook Form.
…dx` documentation to enhance visibility and provide quick access to package metrics.
…complex forms with React Hook Form. Updated sections on type safety, component reusability, and error-prone string-based field paths, enhancing overall readability and developer guidance.
…ion of `useLens` functionality, emphasizing type-safe lenses for reusable form components and composability.
Copy link

vercel bot commented Jun 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-hook-form-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 9, 2025 10:05pm

Copy link

netlify bot commented Jun 7, 2025

Deploy Preview for sage-cassata-31d224 ready!

Name Link
🔨 Latest commit 97194b7
🔍 Latest deploy log https://app.netlify.com/projects/sage-cassata-31d224/deploys/68475a99f0bf3d0009b4db07
😎 Deploy Preview https://deploy-preview-1153--sage-cassata-31d224.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

…tion for improved clarity. Updated language to emphasize type-safe manipulation of data structures and streamlined explanations of core functionalities, enhancing overall readability for developers.
…cessary semicolons and streamlining component examples for improved clarity and consistency.
…y semicolon in the `SharedComponent` example for improved code clarity.
@bluebill1049
Copy link
Member

nice, could we remove this for consistency?
image

bluebill1049
bluebill1049 previously approved these changes Jun 8, 2025
Copy link
Member

@bluebill1049 bluebill1049 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

…ent and focus on the core functionalities of the `useLens` hook.
@aspirisen
Copy link
Contributor Author

@bluebill1049 removed badges

@bluebill1049
Copy link
Member

bluebill1049 commented Jun 9, 2025

some more design comments for consistency. 🙏

could we change this to h3 instead of h1?

image

vs

image

image

would be good to follow the structure of the current other API structure as well?

  1. explain what the hook does
  2. API reference or options
  3. Rules
  4. follow up with examples
  5. video (optional)
  6. tips

…e `useLens` hook, including props, dependency array usage, and core operations. Improved clarity with examples and performance optimization tips, ensuring better guidance for developers working with complex forms in React Hook Form.
@aspirisen
Copy link
Contributor Author

@bluebill1049 I tried to fix

Copy link
Member

@bluebill1049 bluebill1049 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks heaps! looks much more aligned with the rest of the doc.

@bluebill1049 bluebill1049 merged commit 86c2d4e into react-hook-form:master Jun 9, 2025
6 checks passed
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.

Put this library in the docs
2 participants