Having issues with useDeliveryGroup trying to get if pickup is selected

I’ve tried different approaches, if I take the code out of the useEffect. The code rerenders again and again when I select pickup and refreshe the page.

import React, {useEffect, useState} from 'react';
import {
  Banner,
  useApi,
  useTranslate,
  reactExtension,
  useDeliveryGroups,
  useDeliveryGroup,
  useAttributeValues,
  useApplyAttributeChange,
} from '@shopify/ui-extensions-react/checkout';

export default reactExtension(
  'purchase.checkout.reductions.render-after',
  () => 

Any Ideas why this might be? I thought maybe because the updateAttribute was triggering rerender, but even if I try to get the attribute to check it and only change it if its different it does not work either :anguished_face: