jonathanj
useUtils changes at every render and causes useEffect to be called continuously
I'm not sure if it's documented somewhere, I might have read through the code trying to answer this, but I think your dependency should be the result of
useUtils
only. The result of useUtils
is a Proxy
object and the useUtils
property is specially handled to memoize the context result. Accessing other properties on the proxy creates a new reference every time you access the property.4 replies