When using the useGeolocation hook it renders indefinitely when using the optional callback function. See the example below:
https://codesandbox.io/s/nextjs-geolocation-b3defn?file=/pages/react-hook-geolocation.js

When the optional callback function is set to null its working fine.

Is this an expected behaviour?