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

Yuniverse

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

Yuniverse

검색하기 폼
  • 분류 전체보기 (164)
    • 꼬리에 꼬리를 무는 공부 (4)
      • Front-end (4)
      • Back-end (0)
      • CS (0)
    • 우리FISA (26)
    • JS-algorithm (62)
      • 프로그래머스 (38)
      • BOJ (14)
      • JS 100제 (10)
    • HTML & CSS (5)
      • Tailwind CSS (0)
    • JS (12)
      • Javascript (8)
      • Node.js (4)
    • React (8)
    • TypeScript (7)
    • Java (4)
    • 유데미 프로젝트 캠프 (20)
      • 학습일지 (13)
      • 과제 (7)
    • Bundler (9)
      • Parcel (4)
      • Webpack (5)
    • Cloud (3)
      • Firebase (3)
    • 배포 (1)
    • Git (3)
  • 방명록

react js (1)
Vanilla JS 🆚 React JS

Vanilla JS와 React JS로 click me 버튼을 클릭하면 total clicks의 수가 하나씩 증가하는 기능을 각각 만들어 비교해보자. Vanilla JS total clicks : 0 click me const button = document.getElementById('button'); const h3 = document.querySelector('h3'); let counter = 0; function handleClick() { counter += 1; h3.innerText = `total clicks : ${counter}`; } button.addEventListener('click', handleClick); Vanilla JS는 html을 만들고 js로 가져와서 다시 htm..

React 2023. 4. 24. 21:29
이전 1 다음
이전 다음

Blog is powered by Tistory / Designed by Tistory

티스토리툴바