Notice
Recent Posts
Recent Comments
Link
«   2024/07   »
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
Tags
more
Archives
Today
Total
관리 메뉴

훈돌라

2024. 5. 14 리액트 시작,, 본문

카테고리 없음

2024. 5. 14 리액트 시작,,

훈돌라 2024. 5. 14. 23:27
function App() {

  const handleClick = () => {
    alert("안녕하세요!");
  }


  // <---- 자바스크립트 영역 ---->

  return (
    /* <---- HTML/JSX 영역  ---->*/
    <div
      style={{
        height: '100vh',
        display: ' flex',
        flexDirection: 'column',
        justifyContent: 'center',
        alignItems: 'center',
      }}
    >
      { }
      <span>이것은 내가 만든 App 코드입니다</span>
      <button onClick= {handleClick} >클릭!</button>

    </div>
  );
}

export default App;

 

객체 안 자바스크립트 사용 시 {}

 

 

import React from 'react'

function Child () {
 return <div>연결성공</div>
}

function Mother () {
return <Child/>
}

function GrandFather () {
  return <Mother/>
}

function App () {
  return <GrandFather/>
}



export default App

 

프롭스

 

 

 

 

 


 

 

 

 

 

이번 주차 개인과제


 

 

 

 

레이아웃 구현

todo 카드 생성

삭제하기 버튼 토글 시 todo 카드 삭제

 

todo 완료/취소 상태 변경하기

 

얘가 감이 안 잡혀서 15일 ~ 16일 오전에 시간을 할애해서 완성 해보려고 한다..