Since current implementation does not wrap callCallable in useCallback it creates new instance of it on every render. If you use it in useEffect and add it as dependency it will keep running infinitely. In addition for some reason hook is wrapped in useMemo which does absolutely nothing. This PR fixes those two issues and simplifies code little bit.
@pzmudzinski thank you for the submission and apologies it's taken a while to get this merged. I'll do some testing and get this included in an upcoming release.
Since current implementation does not wrap
callCallable
inuseCallback
it creates new instance of it on every render. If you use it inuseEffect
and add it as dependency it will keep running infinitely. In addition for some reason hook is wrapped inuseMemo
which does absolutely nothing. This PR fixes those two issues and simplifies code little bit.