react-hook-form

📋 React Hooks for form state management and validation (Web + React Native)

MIT License

Downloads
25.6M
Stars
39.4K
Committers
318

Bot releases are hidden (Show)

react-hook-form - Version 6.13.0

Published by bluebill1049 almost 4 years ago

🌟 custom hook: useController (#3488)

import React from "react";
import { useController } from "react-hook-form";

function Input({ control, name }) {
  const {
    field,
    meta: { invalid, isTouched, isDirty },
  } = useController({
    name,
    control,
    rules: { required: true },
  });

  return <input {...field} />;
}

👨🏻‍💻 fix #3613 shouldUnregister:false with append deep clone object (#3614)
🐞 fix #3617 remove fields from append dep (#3618)
👨🏻‍💻 close #3628 reset inconsistency with different shouldUnregister mode (#3633)
⌨️ fix #3593 Map type for NestedValue (#3616)
😿 #1680 fix unmount warning on dev build (#3645)
👻 fix #3651 setValue with shouldUnregister:false with deep clone object (#3652)
🤖 change from deepClone to shallowClone with defaultValues's reset (#3607)

react-hook-form - Version 6.12.2

Published by bluebill1049 almost 4 years ago

🐞 fix 3577 issue with Controller register at FieldArray (#3583)
🤜 improve useFieldArray fast refresh (#3576)
🐞 fix input range max/min validation (#3575)
🤝 make cloneObject work in both Node & browsers (#3571)

react-hook-form - Version 6.12.1

Published by bluebill1049 almost 4 years ago

🐞 fix controller register issue with field array (#3561)
🐞 fix fast refresh (#3559)
🐞 fix #3539 issue with JSX deepEqual (#3558)
👨🏻‍💻 improve DX with field array and fast refresh (#3551)

react-hook-form - Version 6.12.0

Published by bluebill1049 almost 4 years ago

⭐️ feature: valueAsNumber, valueAsDate & setValueAs (#3489)

register({ valueAsNumber: true });
register({ valueAsDate: true });
register({ setValueAs: (date) => data });

🤖 enhance #3439 with useWatch default value after reset (#3505)
👨🏻‍💻 fix controller type argument inference (#3501)
🐞 fix #3508 state update with watch (#3511)

react-hook-form - Version 6.11.5

Published by bluebill1049 almost 4 years ago

Revert "🔩 defaultValues test cases for useFieldArray (#3420)" (#3503)

react-hook-form - Version 6.11.4

Published by bluebill1049 almost 4 years ago

🐞 fix #3482 remove nested dirty fields (#3486)
👨🏻‍💻 reduce code + fix dirtyFields with field array + improve DX with fast refresh #1680 (#3474)
👨🏻‍💻 close #3642 issue with dev script (#3463)
👌 use useField internally for Controller (#3483)

react-hook-form - Version 6.11.3

Published by bluebill1049 almost 4 years ago

🐞 fix #3460 issue with nested schema (#3461)

react-hook-form - Version 6.11.2

Published by bluebill1049 almost 4 years ago

🐞 fix #3450 append focus index (#3453)

react-hook-form - Version 6.11.1

Published by bluebill1049 almost 4 years ago

🐞 fix #3440 setError with concurrent isSubmitting (#3443)
🐞 fix setValue name type and checkbox with shouldUnregister:false (#3432)
🐞 fix #3416 date compare (#3419)
📦 [other] Reduce npm package size (#3413)
🐞 fix #3404 reset isValid with resolver (#3410)
👨🏻‍💻 add warning on ref.current.focus when it is not a function (#3407)
👨🏻‍💻 close #3329 useWatch return value to skip extra re-render

react-hook-form - Version 6.11.0

Published by bluebill1049 almost 4 years ago

⌨️ fix #3363 UnpackNestedValue with extends primitive (#3375)
🚨 fix #3373 isDirty will only rely on defaultValues (#3374)
👨🏻‍💻 apply isDirty form check at useForm level for consistency (#3364)
🥶 memoize Controller props (#3324)
🐞 fix #3353 issue with useWatch/watch with Controller (#3361)
🥶 memo control object (#3362)
👨🏻‍💻 add verification if value is defined on FieldArray (#3356)
🐞 fix issue with combining watch/useWatch and clearErrors (#3334)
👓 improve array field checking with dot syntax (#3333)
⌨️ fix #3313 interface extend Record (#3318)

react-hook-form - Version 6.10.1

Published by bluebill1049 almost 4 years ago

🐞 fix #3321 deepEqual with null vs non-primitive data type (#3322)

react-hook-form - Version 6.10.0

Published by bluebill1049 almost 4 years ago

👨🏻‍💻 close #3304 better DX for group error object with resolver (#3307)
👨🏻‍💻 fix #3296 - better DX by Log warning if conflicting keyName is used (#3299)
🎉 improve Controller with input focus (#3278)
🤦🏻‍♂️ fix #3294 empty value reset with useFieldArray (#3297)
🐞 fix defaultValues infer with deepPartial (#3293)
🐞 fix #3286 remove with deep nested field array (#3287)
🤕 init ie export to package.json (#3274)
⚛️ upgrade react peer dependency to v17 (#3273)
📦 fix #3257 - Fix exports for react-native (#3258)
🐞 fix #3261 dirtyField with object or array value compare (#3262)
🔩 close #3254 trigger all to reset errors (#3260)

react-hook-form - Version 6.9.6

Published by bluebill1049 almost 4 years ago

🐞 fix #3223 clone object with File (#3225)
🚅 reading error from updated errors object (#3233)
👨🏻‍💻 fix #3213 with extra check with dirty fields (#3234)
🐞 fix #3238 Controller unregister triggers validation (#3244)
👨🏻‍💻 #3246 fix clone object with Set and Map type (#3247)

react-hook-form - Version 6.9.5

Published by bluebill1049 about 4 years ago

🤧 fix #3205 regression with useWatch not return defaultValue
🤧 fix #3209 regression with setValue FieldArray
🤧 fix #3212 regression with reset shallowStateRef
🐞 fix watch & useWatch with input gets unmounted

react-hook-form - Version 6.9.4

Published by bluebill1049 about 4 years ago

🐞 fix #3193 isDirty with shouldUnregister issue with object clone (#3194)
Revert "💡 refactor: purge scripts (#3126)"

react-hook-form - Version 6.9.3

Published by bluebill1049 about 4 years ago

🐞 fix/shallow state clone (#3185)
🎂 use ref touched fields instead touched (#3175)
🐞 fix #3166 Conditional controlled value keeps registered even if the controller is unmounted
🐞 fix #3158 with dirtyFields with useFieldArray (#3165)
🐞fix #3154 with field array set dirty issue (#3161)
🎂 improve transformToNestObject (#3148)
🥁 include Type useFieldArrayMethods (#3145)
🎢 refactor: let SubmitHandler return any instead of void (#3135)
🚦 fix #3088 issue DeepPartial with interface (#3129)
👨🏻‍💻 improve field array dirty fields checking (#3127)
💡 refactor: purge scripts (#3126)
👨🏻‍💻 fix useFieldArray delete dirty fields (#3119)

react-hook-form - Version 6.9.2

Published by bluebill1049 about 4 years ago

🐞 fix #3098 issue on initial re-render with errors (#3102)

react-hook-form - Version 6.9.1

Published by bluebill1049 about 4 years ago

👨🏻‍🏫 fix reset useFieldArray's shallowFieldsStateRef (#3094)
🐞 fix issues #3085 #3090 (#3091)
🐞 fix #3082 issue with resolver not getting correct form values
👨🏻‍💻 close #3080 useFieldArray: should unregister false with append (#3081)
👨🏻‍💻 close #3066 improve resolver at input registration (#3069)

react-hook-form - Version 6.9.0

Published by bluebill1049 about 4 years ago

🐞 fix #3058 useFieldArray isValid issue (#3065)
🐞 fix #3023 issue with shouldUnregister:false with useFieldArray (#3064)
🐞 close #3032 defaultValues type (#3062)
🏑 feature:useFieldArray default values to empty array with shouldUnregister: false (#3027)
🐞 fix setValue's definition #3007 (#3008)

react-hook-form - Version 6.8.6

Published by bluebill1049 about 4 years ago

revert ⌨️ refactor UseFormMethods to arrow functions (#2899)