react-hooks icon indicating copy to clipboard operation
react-hooks copied to clipboard

feat(input-value): make useInputValue more compatible

Open SyMind opened this issue 3 years ago • 3 comments

Inspired by https://github.com/react-component/field-form/blob/master/src/utils/valueUtil.ts#L120

SyMind avatar Apr 22 '21 22:04 SyMind

I love this feature, and useInputValue can be generic (default to string) since custom components may provide value and onChange in custom types, and strings can also be literal unions for checkbox and radio

otakustay avatar Apr 25 '21 02:04 otakustay

You are right, with generic is better.

SyMind avatar Apr 26 '21 03:04 SyMind

This is a breaking change since initialValue no longer defaults to empty string, I need some more time to think about it

otakustay avatar May 15 '21 08:05 otakustay