hxf31891 / react-gradient-color-picker

An easy to use color/gradient picker for React.js
MIT License
147 stars 49 forks source link

Suggestion to remove `value` existence check from the hook `useColorPicker` #56

Closed av-k closed 1 year ago

av-k commented 1 year ago

Greetings! First of all, thank you for this awesome library!

In conditions where I use the library, there is a possibility that a value doesn't exist or just doesn't need it. Therefore, I have just a little suggestion to simplify the logic of the hook useColorPicker and remove the check (and remove console.log). Business logic can be different, and saying in an imperative approach that you must provide a value is not the optimal case for everyone.

hxf31891 commented 1 year ago

@av-k I can see how this would be annoying lol. I'll take it out, it really doesn't do much anyways.

hxf31891 commented 1 year ago

@av-k fixed in 2.22.23