일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- classList add
- 언젠간가겠지
- nuxt layout
- 접근성
- 내배위의고양이
- classList toggle
- chart.js
- 간식금지다!
- 방심은금물
- 냥빨이다가온다
- ROUTER 버전6
- 리엑트할수있는퍼블리셔라규
- 퍼블리싱
- react
- react-router-dom
- react-router
- windowwidth
- 클래스 토글
- classList
- 안짤렸다
- vue3 setup
- nuxt.js
- classList remove
- 커스텀훅
- 대표님물리기없기
- 포트폴리오
- 배열중복제거
- 2020
- chart responsive
- new set()
- Today
- Total
목록code (106)
틈
import React from 'react'; const Abc = () => { return ( ) } export default Abc; import styled from 'styled-components'; export Container = styled.div` color: ${(props) => props.select ? 'red' : 'blue'}; ` 이 호출과 일치하는 오버로드가 없습니다.(no matched overload) typescript를 이렇게 작성했을 때, styled-component는 이상이 없었지만, react return문에서 에러가 떴습니다. (visual studio code 한글버전이 멋대로 깔려버렸다...) styled-component에 interface를 작성..
import React, { useState, useEffect, useRef } from 'react'; // 브라우저 넓이에 따른 앱 다운로드 링크 변경 const [browserWidth, setBrowserWidth] = useState(0); const resizeTimer = useRef(null); useEffect(() => { const handleResize = () => { if (resizeTimer.current !== null) return; resizeTimer.current = setTimeout(() => { resizeTimer.current = null; setBrowserWidth(window.innerWidth); }, 200); }; window.addEventLi..

input type="password"일 경우, edge에서는 onChange시 자동으로 눈모양 아이콘이 보이게 됩니다. mozilla/5.0 (macintosh; intel mac os x 10_15_7) applewebkit/537.36 (khtml, like gecko) chrome/98.0.4758.102 safari/537.36 edg/98.0.1108.62 edge가 모질라, 크롬 기반이라 방심했는데, 이렇게 호환성에 관한 이슈를 던저주시는군요. 요 아이콘과 겹쳐서 고민했고, 엣지만 따로 대응하는 방향으로 코드를 넣었습니다. //눈모양 아이콘 브라우저 대응(edge에서 안보이도록 설정) const [browserName, setBrowserName] = useState(''); useEffec..
https://jsonplaceholder.typicode.com/users
new Date() 부분은 퍼블리셔가 사용할 일이 없어서 관심밖에 두고 있다가, 개발자 전향을 생각하면서 '한 번 찾아봐야지' 했던 부분입니다. REACT 학습 중 나오는 부분이어서 정리해 놓으려고 합니다. const today = new Date(); const dateString = today.toLocaleDateString("ko-KR", { year: "numeric", month: "long", day: "numeric", }); const dayName = today.toLocaleDateString("ko-KR", { weekday: "long", }); dateString : XXXX년 X월 X일 dayName : X요일 today 변수에 date를 저장하고, .toLocaleDateSt..
객체의 값을 조회할 때 null이나 undefined 속성일 경우, 해당 객체의 프로퍼티를 참조하면 타입 에러가 발생합니다. 타입에러가 발생하면 프로그램이 강제 종료될 수 있는데, 이때에 단축 평가를 하면 에러를 발생하지 않습니다. var elem = null; var value = elem && elem.value; cf. 함수에서 매개변수의 기본값을 설정할 때, function setTest(str) { str = str || ''; } es6+ function setTest(str = ''){ ~~~ } es11+ optional chaning var elem = null; var value = elem?.value; es11+ null 병합(nullish coaliscing) 연산자 var foo..