Closed
Description
In case options or the function for a hook changes, the hook is not updated. This can lead to unexpected behavior.
Maybe we should take the function reference into consideration for adding and removing listeners,
but this would require to wrap all function with useCallback
like in the following example:
const scroll = useScrollEffect(useCallback((scroll) => doStuff(scroll), [doStuff]))