The example in Readme calls for using unsubscribe in useEffect like this:
return ()=>unsubscribe()
This raises an error as the return type of api.whatever.subscribe(...) is void.
In fact proper value is returned, but the example wraps unnecessarily and type definition is void instead of ()=>void.
Also fixed Readme because this arrow function is not needed.
Could be even
The example in Readme calls for using unsubscribe in useEffect like this:
return ()=>unsubscribe()
This raises an error as the return type ofapi.whatever.subscribe(...)
is void. In fact proper value is returned, but the example wraps unnecessarily and type definition isvoid
instead of()=>void
. Also fixed Readme because this arrow function is not needed. Could be eveninstead of
but I don't have enough courage to change that much ;)