useCallback

ยท React
import { useCallback } from "react"; // ... Your imports and other code ... export default function DayPage() { // ... Your state declarations ... // Function to fetch data using useCallback const handleFetchData = useCallback(() => { dayRender(userId, month, date) .then((response) => { // ๋ฐ์ดํ„ฐ ์ฒ˜๋ฆฌ ๋กœ์ง //console.log(response.data.data); setDayConsumptionData(response.data.data.paymentResponses); //..
becky(์ง€์€)
'useCallback' ํƒœ๊ทธ์˜ ๊ธ€ ๋ชฉ๋ก