Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

cco3
Copy link
Contributor

@cco3 cco3 commented Aug 22, 2025

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Because there is not an exported value, getting the form errors by injection:

  • is currently brittle (could change on a future release without causing errors) and
  • does not benefit from implicit typing.

Before:

import type { FormError } from "@nuxt/ui";

const formErrors = inject<FormError[]>('form-errors');

After:

const formErrors = inject(formErrorsInjectionKey);

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@cco3 cco3 requested a review from benjamincanac as a code owner August 22, 2025 13:16
@cco3 cco3 force-pushed the dev branch 2 times, most recently from b448d00 to 40e2812 Compare August 22, 2025 13:23
@pkg-pr-new
Copy link

pkg-pr-new bot commented Aug 22, 2025

npm i https://pkg.pr.new/@nuxt/ui@4808

commit: d28ea02

Because there is not an exported value, getting the form errors by injection:
- is currently brittle (could change on a future release without causing errors) and
- does not benefit from implicit typing.

Before:
```
import type { FormError } from "@nuxt/ui";

const formErrors = inject<FormError[]>('form-errors');
```

After:
```
const formErrors = inject(formErrorsInjectionKey);
```
@cco3 cco3 changed the title Export a formErrorsInjectionKey feat(useFormField): Export a formErrorsInjectionKey Aug 23, 2025
@benjamincanac benjamincanac requested a review from romhml August 25, 2025 10:27
@benjamincanac benjamincanac changed the title feat(useFormField): Export a formErrorsInjectionKey feat(useFormField): export form errors injection key Aug 25, 2025
@benjamincanac benjamincanac merged commit ec2bc0a into nuxt:v3 Aug 25, 2025
6 checks passed
@benjamincanac benjamincanac added the v3 #1289 label Aug 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v3 #1289

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants