diff --git a/.changeset/popular-hats-run.md b/.changeset/popular-hats-run.md deleted file mode 100644 index 66d0c4e..0000000 --- a/.changeset/popular-hats-run.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -"@stevent-team/react-zoom-form": minor ---- - -Remove useField hook and replace with a "controlled" method. - -This allows for more ergonomic usage of custom elements, as you can now wrap a custom field with `controlled` like so and it will give you `value`, `onChange` etc. - -```ts -const schema = z.object({ myInput: z.string() }) - -const { fields } = useForm({ schema }) - -const { value, onChange } = controlled(fields.myInput) -``` diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f2dd40..84f777e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # @stevent-team/react-zoom-form +## 0.2.0 + +### Minor Changes + +- 8c6590a: Remove useField hook and replace with a "controlled" method. + + This allows for more ergonomic usage of custom elements, as you can now wrap a custom field with `controlled` like so and it will give you `value`, `onChange` etc. + + ```ts + const schema = z.object({ myInput: z.string() }); + + const { fields } = useForm({ schema }); + + const { value, onChange } = controlled(fields.myInput); + ``` + ## 0.1.0 ### Minor Changes diff --git a/package.json b/package.json index 2add1be..721354b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@stevent-team/react-zoom-form", - "version": "0.1.0", + "version": "0.2.0", "description": "React forms powered by Zod", "keywords": [ "react",