본문 바로가기 메뉴 바로가기

sy의 코딩 개발일지

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

sy의 코딩 개발일지

검색하기 폼
  • 분류 전체보기 (102)
    • sparta 웹개발 종합반 개발일지 (12)
    • 개발일지 (5)
    • 생활코딩 (3)
    • 독학 (14)
      • html (4)
      • css (5)
      • JavaScript (2)
      • git,github (1)
      • sql (1)
      • php (1)
    • codestates (65)
      • section1 (10)
      • section2 (10)
      • section3 (12)
      • section4 (29)
      • preproject (3)
      • mainproject (1)
    • programmers (1)
      • Lv.0 (1)
  • 방명록

2023/03/23 (1)
custom hook실습

custom hook을 이용하여 useEffect 로직 분리하기 hook.js import { useEffect, useState } from "react"; const useFetchData = (fetchUrl) => { const [data, setData] = useState(); useEffect(() => { fetch(fetchUrl, { headers: { "Content-Type": "application/json", Accept: "application/json" } }) .then((response) => { return response.json(); }) .then((myJson) => { setData(myJson); }) .catch((error) => { console.log(..

codestates/section4 2023. 3. 23. 01:52
이전 1 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
more
«   2023/03   »
일 월 화 수 목 금 토
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바