일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- CSS
- 컴포넌트
- 자바스크립트
- FrontendStydy
- JavaScript
- 메소드 실행
- 렌더링
- 이벤트핸들링
- 함수 실행
- REACT
- 배열메소드
- promise
- frontendstudy
- webProject
- 리액트
- try.. catch
- callback함수
- 배열
- typeScript
- addEventListener
- Frontend Study
- input
- useState
- 이벤트
- HTML
- Props
- 비동기함수
- DOM
- useRef
- this 객체
- Today
- Total
목록배열 (2)
이다닷
➡️삭제버튼 추가 UserList.js 변경 import React from 'react'; function User({ user, onRemove }) { return ( {user.username} ({user.email}) onRemove(user.id)}>삭제 ); } function UserList({ users, onRemove }) { return ( {users.map(user => ( ))} ); } export default UserList; 변경사진 ➡️특정 id를 가진 객체를 삭제하는 기능을 가진 onRemove 함수 만들기 📌filter 함수 배열에서 특정 조건을 만족하는 값들만 따로 추출하여 새로운 배열을 만들어주는 함수이다. APP.js 변경 import React, { use..

Element.classList 웹 요소로부터 클래스 콜렉션을 반환하는 읽기 전용 속성이다. 사용방법 const 이름 = document.querySelector('이름') 메소드 종류 메소드 기능 사용 예 add 지정한 클래스 값 추가 add("new_class") remove 지정한 클래스 값 제거 remove("old_class") item 인덱스를 이용해 클래스 값 반환 item(1) toggle 클래스 값 토글링(=있으면 제거, 없으면 생성) toggle("some_value") contains 지정한 클래스 값 존재 여부 확인 contains("is_contains") replace 기존 클래스를 새 클래스로 대체 replace("old", "new") 배열의 개념과 사용법 배열이란? 배열은 ..