useEffect(() => { }, [bill, tipPercentage, numberOfPeople]);
2 setTipPerGroup(tipPerGroup);
};React Hook useEffectEither include it or remove the dependency array
为什么useEffect<
我试图使用axios在useEffect中获取数据,但每次我更改页面时,它都会获取数据。有没有办法在更改页面时不触发useEffect?我试着使用shawllow推送,但它不起作用。我无法在服务器端获取,因为我在axios拦截器中使用了next/router。useRouter } from 'next/router';
const r