본문 바로가기

분류 전체보기69

[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]Could not find a declaration file for module 'react-query' 에러 해결법 Could not find a declaration file for module 'react-query' 에러에서 하라는 대로 `@types/react-query `도 설치해보고 `.d.ts`파일도 만들어 봤지만.... 계속 해결할 수 없었다. 해결방법 npm install @tanstack/react-query 이후에 react-query 대신 '@tanstack/react-query'를 설치하고 import 한다!! 라이브러리 이름이 변경되었다고 한다..! import { QueryClient, QueryClientProvider } from '@tanstack/react-query' 참고 https://codingapple.com/forums/topic/react-query-%EC%84%A4%EC%.. 2022. 8. 11.