본문 바로가기

공부한것26

[NEXT15] Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used 오류 해결 Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used- A server/client branch `if (typeof window !== 'undefined')`.- Variable input such as `Date.now()` or `Math.random()` which changes each time it's called.- Date formatting in a user's locale which doesn't match the s.. 2025. 1. 15.
절차적 프로그래밍과 함수형 프로그래밍 프롱트 [for, if 둘다 제거해 보세요] 영상을 보다가 코드 결과가 궁금해서 실제로 돌려봤습니다. const grades = [88.34, 90, -95, -35, 44.4, 100, 213, 33, 22.44, ,3, 5, 4, 44, 53.43, 343, 22.3, 11.22, 120,88.34, 90, -95, -35, 44.4, 100, 213, 33, 22.44, ,3, 5, 4, 44, 53.43, 343, 22.3, 11.22, 120]; //['88점', '90점', '44점', '100점'] /* 1. 0~100 사이의 숫자 인지 2. 소수점 제거하기 3. '점' 문자 추가 4. 출력 */ //절차적 프로그래밍 console.time("절차") const validGrades = [].. 2022. 12. 29.
[JS] pipeline operator 인강을 듣다가 신기한 문법을 보게 되었다. const a = pow(30, 2); const b = pow(b, 30); const c = pow(a, 30); //or pow(pow(pow(30, 2), 30), 30)); //or 30.pow(2).pow(30).pow(30); 이런 코드를 아래와 같이 작성할 수 있는 기능이 라고 한다. const result = 30 |> pow(^, 2) |> pow(^, 30) |> pow(^, 30); 여기에서 `|>`은 30을 ^로 불러오고, 그 계산된 값을 두 번째 ^로 불러오고, 마지막으로 계산된 값을 ^로 불러와서 계산한 뒤 결과를 result에 대입하는 문장이다. 지금도 stage2인거 같기는 해서...? 어쨌든 아직은 사용하기 어려운 것 같지만 신기.. 2022. 12. 25.
[React] useCallback - 함수 memoization 이 글은 별코딩의 React Hooks에 취한다 - useCallback 짱 쉬운 강의 | 리액트 훅스 시리즈영상을 정리한 글입니다. useMemo에 대한 개념을 익히고 useCallback을 공부하는 것을 추천합니다..!! 제가 작성한 블로그 글은 다음과 같습니다!! [핀테크 서비스 프론트엔드 개발자 취업 완성 2기/React] - [React] useMemo, memoization 공부하기! Memoization : 메모이제이션(memoization)은 컴퓨터 프로그램이 동일한 계산을 반복해야 할 때, 이전에 계산한 값을 메모리에 저장함으로써 동일한 계산의 반복 수행을 제거하여 프로그램 실행 속도를 빠르게 하는 기술이다. 동적 계획법의 핵심이 되는 기술 위키백과 1. useCallback 1-1. 개.. 2022. 8. 5.