next 공식문서를 살펴보면 단순 서버 fetch (서버액션x) 관련 에러 핸들링 방법은 딱히 안나와 있는 것 같아 질문드립니다. 만약 SectionA, SectionB, SectionC 서버 컴포넌트 내에서 각각 서버 fetch가 일어난다 가정했을 때 SectionB에서만 요청이 실패했다면 SectionB 영역만 fallback ui를 띄우고 나머지 SectionA, SectionC는 정상적으로 데이터를 렌더링하도록 구현하는 방법이 없을까요? error-boundary 라이브러리는 클라이언트 환경에서만 사용가능해 서버 컴포넌트에선 사용할 수 없고 next 내부적으로 설계되어있는 에러 바운더리(error.js 등)는 전역에러를 캐치하는 걸로 알고있습니다. 때문에 페이지 내 특정 영역만 fallback ui를 띄우는 용도는 아닌 것 같더라구요. 혹시 다른 방법이 있나 궁금합니다 감사합니다!!
제가 문제를 풀때, 너무 하드코딩을 하는것 같이 느껴집니다. 우선 문제를 먼저 풀어보고, 강의를 듣고 있는데, 선생님이 푼 방법으로 풀려고 노력하는게 좋을까요? 아니면, 선생님이 푼 방법으로 바꾸려고 노력하는게 좋을까요?? 제가 짠 코드는 이렇습니다. function solution(data){ let answer = []; let rotten_carret = 0; let rotten_carret_count = 0; //일단 for문으로, carret 밭 전체 탐색 for(let i = 0; i < data.length; i++) { for(let j = 0; j < data[i].length; j++) { //#일때 썩은당근 갯수 ++ if(data[i][j] === '#') { rotten_carret++; } //만약 0이라면 if(data[i][j] === 0) { //빈곳에서 주변 탐색을 통한 썩은 당근 갯수 구하기 for문 for(let k = (i-1); k <= (i+1) && k < data.length; k++) { for(let f = (j-1); f <= (j+1) && f < data[i].length; f++) { if( (k >= 0 && f >= 0) && (k!==i || f!==j)) { if(data[k][f] === '#') { //console.log ${i},${j}일때 ${k},${f} 엔 ${rotten_carret_count} ); rotten_carret_count++; } } } } } } } answer.push(rotten_carret); answer.push(rotten_carret_count); return answer; } 어떤 방식으로 학습하는 것이 더 효율적일지 의문이 들어 이렇게 문의 드립니다.
안녕하세요. 정말 바보같은 질문이라고 생각하고 있는데요. 이런 질문 정말 죄송합니다. 리퀘스트 메모이제이션은 서버 측에서 렌더링하는 과정에서 일어난다고 하셨는데 클라이언트 컴포넌트도 서버 측에서 렌더링이 되긴 하니까 리퀘스트 메모이제이션이 가능하지 않을까 생각했습니다. 근데 useEffect에서 GET 요청으로 보낼 경우 서버측에서는 렌더링되지 않으니까 메모이제이션이 안 될 것으로 생각이 되었습니다. 클라이언트 컴포넌트에 리퀘스트 메모이제이션이 적용되지 않는다고 이해하면 될까요? 이런 리퀘스트 메모이제이션은 서버에서 일어나는거니까 당연히 Network 탭에서 확인이 불가능하겠죠? 그리고 병렬 라우트에서도 리퀘스트 메모이제이션이 동작하나요?
추가로 npx expo start 해서 expo go 로 앱열면 이런 에러가나요.. 구글 OAuth 도전하다가 오류나는것 같은데.. 이제 메트로를 못쓰는건가요? development build로 들어가야하나요? › › Choose an app to open your project at http://192.168.10.54:8081/_expo/loading › Metro waiting on exp://192.168.10.54:8081 › Scan the QR code above with Expo Go (Android) or the Camera app (iOS) › Web is waiting on http://localhost:8081 › Using Expo Go › Press s │ switch to development build › Press a │ open Android › Press i │ open iOS simulator › Press w │ open web › Press j │ open debugger › Press r │ reload app › Press m │ toggle menu › shift+m │ more tools › Press o │ open project code in your editor › Press ? │ show all commands iOS Bundled 539ms node_modules/expo-router/entry.js (1439 modules) WARN expo-notifications: Android Push notifications (remote notifications) functionality provided by expo-notifications was removed from Expo Go with the release of SDK 53. Use a development build instead of Expo Go. Read more at https://docs.expo.dev/develop/development-builds/introduction/ . WARN expo-notifications functionality is not fully supported in Expo Go: We recommend you instead use a development build to avoid limitations. Learn more: https://expo.fyi/dev-client . WARN Require cycle: services/notificationService.ts -> services/firebaseService.ts -> services/notificationService.ts Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle. LOG Firebase Messaging not available in Expo Go LOG Firebase Messaging not available in Expo Go ERROR Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNGoogleSignin' could not be found. Verify that a module by this name is registered in the native binary., js engine: hermes WARN Route "./(auth)/login.tsx" is missing the required default export. Ensure a React component is exported as default. ERROR Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNGoogleSignin' could not be found. Verify that a module by this name is registered in the native binary., js engine: hermes WARN Route "./(auth)/signup.tsx" is missing the required default export. Ensure a React component is exported as default. ERROR Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNGoogleSignin' could not be found. Verify that a module by this name is registered in the native binary., js engine: hermes WARN Route "./(modals)/add-asset.tsx" is missing the required default export. Ensure a React component is exported as default. ERROR Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNGoogleSignin' could not be found. Verify that a module by this name is registered in the native binary., js engine: hermes WARN Route "./(modals)/add-book.tsx" is missing the required default export. Ensure a React component is exported as default. ERROR Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNGoogleSignin' could not be found. Verify that a module by this name is registered in the native binary., js engine: hermes WARN Route "./(modals)/add-category.tsx" is missing the required default export. Ensure a React component is exported as default. ERROR Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNGoogleSignin' could not be found. Verify that a module by this name is registered in the native binary., js engine: hermes WARN Route "./(modals)/add-transaction.tsx" is missing the required default export. Ensure a React component is exported as default. ERROR Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNGoogleSignin' could not be found. Verify that a module by this name is registered in the native binary., js engine: hermes WARN Route "./(modals)/advanced-stats.tsx" is missing the required default export. Ensure a React component is exported as default. ERROR Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNGoogleSignin' could not be found. Verify that a module by this name is registered in the native binary., js engine: hermes WARN Route "./(modals)/asset-detail.tsx" is missing the required default export. Ensure a React component is exported as default. ERROR Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNGoogleSignin' could not be found. Verify that a module by this name is registered in the native binary., js engine: hermes WARN Route "./(modals)/book-sharing.tsx" is missing the required default export. Ensure a React component is exported as default. ERROR Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNGoogleSignin' could not be found. Verify that a module by this name is registered in the native binary., js engine: hermes WARN Route "./(modals)/budget-settings.tsx" is missing the required default export. Ensure a React component is exported as default. ERROR Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNGoogleSignin' could not be found. Verify that a module by this name is registered in the native binary., js engine: hermes WARN Route "./(modals)/change-password.tsx" is missing the required default export. Ensure a React component is exported as default. ERROR Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNGoogleSignin' could not be found. Verify that a module by this name is registered in the native binary., js engine: hermes WARN Route "./(modals)/manage-categories.tsx" is missing the required default export. Ensure a React component is exported as default. ERROR Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNGoogleSignin' could not be found. Verify that a module by this name is registered in the native binary., js engine: hermes WARN Route "./(modals)/profile.tsx" is missing the required default export. Ensure a React component is exported as default. ERROR Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNGoogleSignin' could not be found. Verify that a module by this name is registered in the native binary., js engine: hermes WARN Route "./(modals)/select-book.tsx" is missing the required default export. Ensure a React component is exported as default. ERROR Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNGoogleSignin' could not be found. Verify that a module by this name is registered in the native binary., js engine: hermes WARN Route "./(modals)/user-id-code.tsx" is missing the required default export. Ensure a React component is exported as default. ERROR Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNGoogleSignin' could not be found. Verify that a module by this name is registered in the native binary., js engine: hermes WARN Route "./(onboarding)/create-first-book.tsx" is missing the required default export. Ensure a React component is exported as default. ERROR Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNGoogleSignin' could not be found. Verify that a module by this name is registered in the native binary., js engine: hermes WARN Route "./(tabs)/asset.tsx" is missing the required default export. Ensure a React component is exported as default. ERROR Invariant Violation: TurboModuleRegistry.getEnforcing(...): WARN [Layout children]: No route named "profile" exists in nested children: ["about", "book-settings", "help", "index", "invite-code", "join-book", "notifications", "settings", "book/[id]", "book/[id]/budget", "friends/requests", "ledger/[id]"] WARN [Layout children]: No route named "add-transaction" exists in nested children: ["about", "book-settings", "help", "index", "invite-code", "join-book", "notifications", "settings", "book/[id]", "book/[id]/budget", "friends/requests", "ledger/[id]"] WARN [Layout children]: No route named "add-book" exists in nested children: ["about", "book-settings", "help", "index", "invite-code", "join-book", "notifications", "settings", "book/[id]", "book/[id]/budget", "friends/requests", "ledger/[id]"] WARN [Layout children]: No route named "add-category" exists in nested children: ["about", "book-settings", "help", "index", "invite-code", "join-book", "notifications", "settings", "book/[id]", "book/[id]/budget", "friends/requests", "ledger/[id]"] WARN [Layout children]: No route named "select-book" exists in nested children: ["about", "book-settings", "help", "index", "invite-code", "join-book", "notifications", "settings", "book/[id]", "book/[id]/budget",
안녕하세요 푸쉬알림 카카오로그인 할때 엑스포 고우로 통해서 개발이 안되는걸로 아는데 그이후로부터는 빌드된 앱으로 들어가서 테스트 하는걸로 알고 있거든여 근데 빌든된 앱을 들어가서 ip주소 수동으로 쳐서 들어가려고 하는데 계속 에러가뜨네요 ping테스트 도 해보고 서버도 켜서 웹브라우저에서 번들 다운되는지도 확인했는데 에뮬레이터 접속이 안되네요
제목 그대로 수정하기 기능 구현 중 작성완료 버튼을 누르면 리스트에 나와야 하는데 위의 그림처럼 빈 리스트가 나옵니다. 계속 강의와 코드를 번갈아가면서 보는데 오류를 잡기 쉽지 않습니다. 아래는 실습했던 소스코드입니다. https://github.com/PARKSUNJUNG/section12 무엇이 문제일까요?
안녕하세요 부산사는 유아람이라고 합니다. 수업 잘 듣고 있습니다. 한 가지 궁금한 점이 있어서 이렇게 글을 작성합니다. *{} 가 전체 선택자이고 div {} 는 태그 선택자라고 가르쳐주셨는데, 마지막에 실험을 하는데서 궁금해서 말씀드립니다. <!DOCTYPE html> <html lang="ko"> <head> <title>Document</title> <style> * { box-sizing: border-box; } div { width: 80px; height: 80px; border: 1px solid red; padding: 10px; } /* #contentBox { box-sizing: content-box; } #borderBox { box-sizing: border-box; } */ </style> </head> <body> <div id="contentBox">박스 1</div> <div>박스 2</div> <div id="borderBox">박스 3</div> </body> </html> <body> <div>박스 1</div> 는 처음에 아무런 style을 지정하지 않았을 때, 박스로 나타나지 않고 그냥 텍스트 "박스 1"만 적혀있었는데, 이건 제 눈에 안보이는 박스가 이미 형성이 되어있는데 색이나 크기를 지정하지 않아서 그냥 텍스트로 보이는게 맞나요? div { width: 80px; height: 80px; border: 1px solid red; padding: 10px; } 이걸 지정하면서 보이지 않던 박스가 생긴걸까요? 밑에 설정을 한 div 전체니까 div{}로 하지않고 *를적용해서 <!DOCTYPE html> <html lang="ko"> <head> <title>Document</title> <style> * { box-sizing: border-box; } * { width: 80px; height: 80px; border: 1px solid red; padding: 10px; } /* #contentBox { box-sizing: content-box; } #borderBox { box-sizing: border-box; } */ </style> </head> <body> <div id="contentBox">박스 1</div> <div>박스 2</div> <div id="borderBox">박스 3</div> </body> </html> 이렇게 나오던데 이건 왜 이렇게 되는걸까요?
현재 군대 사지방에서 공부하고 있는 군인입니다. 지금 현재 [입중급]CSS&JS 마스터를 수강하고 있습니다. 섹션1을 마치고 과제1을 모두 마치는 데에 총 4일이 소요됐습니다. 매일 2시간 씩밖에 컴퓨터를 사용하지 못하는데 이정도 속도면 괜찮은지 여쭙고 싶습니다. 그리고 중간중간 코드 리뷰를 받고 싶을 때에는 어떻게 하면 될까요?
const getSortBy = () =>{ if(window.location.search){ const sortText = window.location.search.split('sort=')[1].split('&')[0]; console.log(`getSortBy : ${sortText}`); return sortText; }; return 'total'; }; const getSearchWord = () => { if(window.location.search && window.location.search.includes('search=')){ return window.location.search.split('search=')[1]; }; return ''; }; ... this.state = { startIdx: 0, sortBy : getSortBy(), searchWord: getSearchWord(), region: "", cities: "",}; 일단 문제가 되는 코드는 이 부분 입니다. 이부분을 작성 한 이후로, 새로고침 하면 아래 시티리스트가 안나오다가 상단 sort 또는 search 를 주석처리 하면 리스트가 출력 됩니다 전체 코드는 아래 git 주소를 같이 봐주시면 감사하겠습니다. https://github.com/KimDay366/onebite_js/tree/main/section09/Trip-Wiki 한시간째 똑같은 코드만 보고 있는데, 계속 봐도 저는 뭐가 문제인지 모르겠네요 ㅠㅠㅠ
Next.js 완벽 마스터 (v15): 노션 기반 개발자 블로그 만들기 (with 커서AI)
아무리 해도 안되서, 기존 코드를 복붙하고 사용하고, 공식문서를 봐도 페이지 properties의 Author.people[0] 내부에는 { id: "0219380..." , object: "user" } 만 있습니다. 이마저도 문자열이라 name프로퍼티가 없습니다. 노션 템플릿도 author가 적용이 되어있는 걸 확인했는데요. 혹시 api가 변경이 된 것일까요?