Closed goce-cz closed 3 years ago
Based on the described use case of useValueVersion
, it indeed seems that useInternedValue
could fully replace it when needed. I can't think of any reasonable use case for actual number of times the value was changed that couldn't be handled by higher-level useInternedValue
. The fact that it removes linter warning might be something to consider as well. Let's do it 💪
Related issue: #28
I'm starting to question the usefulness of useValueVersion hook outside of its only usage within the library - the useInternedValue
Somehow I'm leaning towards the opinion that
useInternedValue
would simply do better job anywhere theuseValueVersion
comes in mind.Example
can easily be replaced with probably more obvious and way more React friendly
Both hooks are very simple, so I'd be keen to merge them if we decide not to export the
useValueVersion
.What do you think? Should we remove 👍 or not 👎 ?