hxf31891 / react-gradient-color-picker

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

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

Closed av-k closed 9 months ago

av-k commented 10 months 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 10 months 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 9 months ago

@av-k fixed in 2.22.23