score:2

useeffect method is like, useeffect(() => {}, []), but your usage in requestdialog is wrong. try changing with following.

function requestdialog() {
  const { trigger } = usepopupcontext();
  react.useeffect(() => {
    trigger(count);
  }, [count, trigger]);
}

Related Query

More Query from same tag