Skip to content

Commit

Permalink
🥼 update changelog related to #8653
Browse files Browse the repository at this point in the history
  • Loading branch information
bluebill1049 committed Jul 9, 2022
1 parent e2e7aff commit 3a461d6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@
## Breaking Change

- `@hookform/resolvesrs` needs to upgraded to version `^2.9.3` above
- `useFormContext` do always required to provide a generic type check for your form, without providing generic will now require developers to convert error messages to `String` to pass the type check

```tsx
useFormContext<FormValues>(); // ✅ correct usage by provide form type defination

const { formState } = useFormContext(); // if generic is missing
String(formState.errors?.input?.message); // will need to convert to string
```

## Changed

Expand Down

0 comments on commit 3a461d6

Please sign in to comment.