안녕하세요 강의 잘 듣고있습니다. 1:56초쯤에서 헷갈리는 부분이 있어서 질문드립니다. var total도 표현식이라고 말씀하셨는데요. 제가 기존에 알고있는 개념은 "값으로 평가될 수 있는 문"을 표현식이라고 알고있습니다. 따라서 var total은 "표현식이 될 수 없는 문"으로 이해하고 있었는데, 혹시 제가 잘못 이해하고 있는걸까요?
안녕하세요! 강의 도중 궁금한게 생겨 여쭤보기 위해 질문 드립니다! 다름이아니라, 서버 액션과 api route의 차이가 속도 말고 어떤 때에 서버 액션을 써야하고, api route를 사용해야하는지 여쭤보고싶습니다! 찾아본 바로는 서버 액션은 POST, PATCH 등 폼 제출 시에 사용하는 것이라는데, 폼 제출 시에는 무조건 서버액션을 사용하는 것이 맞는지, 아니라면 단지 개발자 판단 하에 사용하면 되는 것인지 여쭤보고싶습니다!
로그인하여 /home에 접속해 있는 도중, 세션이 만료된 상태에서 사용자 정보가 필요한 /message 또는 /explore 등으로 클라이언트 네비게이션을 통해 페이지를 이동하는 경우, 미들웨어의 세션 검사를 거쳐 로그인 페이지로 이동되지 않고 not-found 페이지가 뜨는 오류가 있습니다. / / middleware.ts import { NextResponse } from "next/server"; import { auth } from "./auth"; export { auth } from "./auth"; export async function middleware() { const session = await auth(); if (!session) { return NextResponse.redirect(`http://localhost:3000/i/flow/login`); } } export const config = { matcher: ["/compose/tweeet", "/home", "/explore", "/messages", "/search"], }; 로그인 이 후 쿠키를 삭제를 통해 세션을 없애고 클라이언트 네비게이션을 통해 페이지 이동을 하면 미들웨어의 세션 검사에 걸려 redirect가 진행됩니다. /i/flow/login 페이지로 url이 변경되긴 했지만 병렬 라우트 및 인터셉팅 라우트로 인한 간섭이 있어 제대로 된 page를 찾지 못하는 것으로 보이는데 정확한 원인을 알 수 없어 문의 드립니다.
정말 친절하고 세세한 강의~ 감동 받으면서 잘 듣고 있습니다. 한가지 궁금한 점은.. 강사님은 Vite로 강의하시는데.. Create React App도구를 사용하는 것과 차이가 많이 있을까요? Create React App으로 강의를 들어도 무방한지도 알고 싶습니다. 감사합니다^^
뭔가 잘 모르겠는데.. 아래 확인 부탁드려도 될까요? 설정한것도 없는것 같은데 기본 생성 명령어자체가 실행이 안된다니..ㅠㅠㅠㅠ manijang2@gimseonman-ui-MacBookAir VSProjects % npx create-react-app cra-react-app Creating a new React app in /Users/manijang2/VSProjects/cra-react-app. Installing packages. This might take a couple of minutes. Installing react, react-dom, and react-scripts with cra-template... added 1324 packages in 40s 268 packages are looking for funding run `npm fund` for details Initialized a git repository. Installing template dependencies using npm... npm error code ERESOLVE npm error ERESOLVE unable to resolve dependency tree npm error npm error While resolving: cra-react-app@0.1.0 npm error Found: react@19.0.0 npm error node_modules/react npm error react@"^19.0.0" from the root project npm error npm error Could not resolve dependency: npm error peer react@"^18.0.0" from @testing-library/react@13.4.0 npm error node_modules/@testing-library/react npm error @testing-library/react@"^13.0.0" from the root project npm error npm error Fix the upstream dependency conflict, or retry npm error this command with --force or --legacy-peer-deps npm error to accept an incorrect (and potentially broken) dependency resolution. npm error npm error npm error For a full report see: npm error /Users/manijang2/.npm/_logs/2025-02-03T13_23_36_276Z-eresolve-report.txt npm error A complete log of this run can be found in: /Users/manijang2/.npm/_logs/2025-02-03T13_23_36_276Z-debug-0.log `npm install --no-audit --save @testing-library/jest-dom@^5.14.1 @testing-library/react@^13.0.0 @testing-library/user-event@^13.2.1 web-vitals@^2.1.0` failed manijang2@gimseonman-ui-MacBookAir VSProjects %
yarn codegen을 입력하면 이런 에러가 뜹니다 Not all operations have an unique name: fetchBoard: success Saved 1 new dependency. info Direct dependencies └─ @graphql-codegen/cli@5.0.4 info All dependencies └─ @graphql-codegen/cli@5.0.4 코드젠은 이렇게 잘 설치가 되었고 package.json 에도 이렇게 추가해 놓았습니다 "codegen": "graphql-codegen --config codegen.ts" PS C:\Users\young\Desktop\frontend\class-example\my-app> yarn codegen yarn run v1.22.22 warning ..\..\..\..\package.json: No license field $ graphql-codegen --config codegen.ts ✔ Parse Configuration ❯ Generate outputs ❯ Generate to ./src/commons/graphql/ ✔ Load GraphQL schemas ✔ Load GraphQL documents ⠏ Generate [client-preset] the following anonymous operation is skipped: mutation { createBoard(writer: "윰", title: "작성중", contents: "내용작성중") { _id number message } } [client-preset] the following anonymous operation is skipped: query { fetchBoard(number: 1) { number writer title contents } } [client-preset] the following anonymous operation is skipped: query { fetchBoard(number: 2) { number writer title contents } } [client-preset] the following anonymous operation is skipped: query { fetchBoards { number writer title contents } } [client-preset] the following anonymous operation is skipped: query { fetchBoards { number ✔ Parse Configuration ⚠ Generate outputs ❯ Generate to ./src/commons/graphql/ ✔ Load GraphQL schemas ✔ Load GraphQL documents ✖ Not all operations have an unique name: fetchBoard: * fetchBoard found in: - C:/Users/young/Desktop/frontend/class-examp… error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
안녕하세요 공통 컴포넌트 구현하기 강의 부분에서 Header 컴포넌트에 대해 여쭤볼게 있어 질문을 드립니다. Header컴포넌트가 App컴포넌트에 import 되어 있고 props로 title, leftChild, rightChild가 전달이 되는데 leftChild, rightChild는 버튼이니 만들어 놓은 버튼 컴포넌트를 전달해서 들어갈 내용을 동적으로 바꿔주는건 이해가 되지만 title 부분은 그냥 props로 전달하지 않고 Header 컴포넌트 내부에 그냥 작성을 해도 될것같은데 이렇게 title props로 전달하는 이유가 궁금합니다.
안녕하세요. 현재 슬리액트, '회원가입 페이지 만들기' 파트를 듣고 있습니다. 회원가입을 누르면, 'TypeError: Cannot read properties of null' 라는 에러가 발생합니다. DB, users 폴더에는 새로운 회원정보가 잘 드렁가 있습니다. DB에는 잘 저장되는데, 프론트엔드에서 발생하는 에러일까요? 코드는 제가 거의 건든게 없습니다. 현재 제로초님이 Github 에 올려주신 코드에서 '비밀번호가 입력이 잘못되었습니다' 이부분 검증하는 부분은 추가되어 있습니다.
안녕하세요. 수업을 진행하던 도중 오류가 발생하여 문의드립니다. 'npm add mongoose' 를 실행 했는데 Error: EPERM에러가 자꾸 뜨네요. 인터넷에서 찾아가면서 .bin파일을 지워도 보고 npm캐시도 삭제해 보고 oneDrive도 중지 시켜보고 해봤지만 오류가 해결이 안되어서 글 남깁니다. 아래 이미지는 오류 내용 캡쳐했습니다.