fable-react
fable-react copied to clipboard
Why is useCallback not implemented?
Hi,
I had a use case that seemingly could benefit from useCallback, although in this particular case I think I can get away with useRef (because I have no dependencies). All the same, it led me to find that useCallback has been commented out (and probably needs to be generic) and I wondered why that is?
Thanks
Is it perhaps because a useMemo that returns a function is basically equivalent? That's what I ended up landing on. If that's the case, it makes me wonder why React has both useMemo and useCallback.
TBH, I don't remember exactly. Maybe it was because we wanted to change the signature to a generic but had an issue with Fable currying/uncurrying and we didn't solve it at the end. Feliz does have a binding but only accepts 1-arity functions.
Sorry, closed this by mistake.