목록분류 전체보기 (149)
기록
ㅁㄴㅇㅎㅁㄴㅇㅎ
if(newData.cdId){ ==> newData.cdId가 truthy한 값일때, 즉 양의정수,음의정수,양의실수,음의실수, 문자열 등 } if(!newData.cdId){ ==> newData.cdId가 falsy한 값일때 즉 false, 0, ''(빈문자열), null, undefined, NaN 값일때 만약 newData에 cdId속성이 존재하지 않으면 undefined 로 간주하고 이 조건문을 타게 된다. }
Kendo UI Grid를 사용하여 React 페이지에서 특정 컬럼을 고정하려면 Kendo UI Grid의 locked 속성을 사용할 수 있습니다. 이 속성을 사용하면 그리드에서 일부 컬럼을 고정할 수 있습니다. 아래는 Kendo UI Grid를 사용하여 특정 컬럼을 고정하는 방법입니다: 1.Kendo UI 설치 및 설정: 먼저, Kendo UI Grid를 사용하기 위해 Kendo UI를 설치하고 프로젝트에 설정합니다. npm install --save @progress/kendo-react-grid 그런 다음 필요한 스타일 및 테마를 가져올 수 있습니다. 2. 컬럼 정의: 그리드 컴포넌트 내에서 컬럼을 정의합니다. 고정할 컬럼에 locked 속성을 추가하고 그 값을 true로 설정합니다. 이렇게 하면 ..
import React, { lazy, Suspense } from 'react'; const MyLazyComponent = lazy(() => import('./MyComponent')); function App() { return ( ); } React.lazy는 React 라이브러리에서 제공되는 기능 중 하나로, 코드 스플리팅을 쉽게 구현할 수 있도록 도와주는 기능입니다. 코드 스플리팅은 애플리케이션 번들을 여러 개의 작은 번들로 나누는 기술로, 초기 로딩 시간을 줄이고 사용자 경험을 향상시키는 데 도움을 줍니다. React.lazy는 컴포넌트를 동적으로 로드할 때 주로 사용됩니다. 다음은 React.lazy의 주요 특징과 사용 방법에 대한 간략한 설명입니다: 동적 컴포넌트 로딩: React.la..
const toDoForm = document.querySelector("#todo-form"); const toDoInput = toDoForm.querySelector("input"); //const toDoInput = document.querySelector("#todo-form input"); const toDoList = document.querySelector("#todo-list"); function deleteToDo(event){ const li = event.target.parentElement; //클릭된 element의 부모 여기선 li를 가리킴. li.remove(); } function paintTodo(newTodo){ const li = document.createEleme..

00:00:00 quotes.js (명언랜덤) const quotes = [ { quote : "명언1", author : "넹1" }, { quote : "명언2", author : "넹2" }, { quote : "명언3", author : "넹3" }, { quote : "명언4", author : "넹4" }, { quote : "명언5", author : "넹5" }, { quote : "명언6", author : "넹6" }, { quote : "명언7", author : "넹7" }, { quote : "명언8", author : "넹8" }, { quote : "명언9", author : "넹9" }, { quote : "명언10", author : "넹10" }, ] const quote..

setInterval interval은 '매번' 일어나는 무언가를 말함 매 2초마다 무슨일이 일어나게 하고 싶을때 사용하는게 interval 함수 setInterval()은 2개의 argument를 받는다. 첫번째 argument는 내가 실행하고자 하는 function 두번재 argument는 호출되는 function 간격을 몇 ms(milliseconds)로 할지 결정하면 됨 setInterval(sayHello,5000) //sayHello함수가 5초마다 실행됨. setTimeout 만약 기다렸다가 실행하고 싶으면? setTimeout()함수 이용 setTimeout(sayHello, 5000); //sayHello함수가 5초후에 실행됨 padStart string에 쓸 수 있는 function 함수..
바뀌는값 const h1 = document.querySelector("div.hello:first-child h1"); function handleTitleClick(){ const clickedClass = "active"; if(h1.classList.contains(clickedClass)){ h1.classList.remove(clickedClass); } else { h1.classList.add(clickedClass); } } h1.addEventListener("click",handleTitleClick); const h1 = document.querySelector("div.hello:first-child h1"); function handleTitleClick(){ h1.classLi..
const h1 = document.querySelector("div.hello:first-child h1"); function handleTitleClick(){ const currentColor = h1.style.color; //getter개념 -변수가 가지는 의미에 따라서 나눠서 선언 let newColor; //setter개념 -변수가 가지는 의미에 따라서 나눠서 선언 if(currentColor === "blue"){ newColor = "tomato"; }else{ newColor = "blue"; } h1.style.color = newColor; } h1.addEventListener("click",handleTitleClick);

npm i gh-pages 설치 gh-pages란 결과물을 github pages에 업로드 할 수 있게 해주는 패키지 github에서 무료로 제공한다. package.json 안의 scripts - build 확인 npm run build 위의 스크립트를 실행하면 웹사이트의 production ready code를 생성 production ready 란? 코드가 압축되고 모든게 최적화 된다는 의미 명령어로 build 실행 -> 압축, 최적화 실행 실행이 완료되면 build라는 폴더가 생김 안의 js를 살펴보면 내가 작성했던 코드가 압축되어 있는것을 확인할 수 있음 (확인용) 그 후에 깃에서 repository를 생성해주고, git init git remote -v를 이용하여 repository 확인 만약..