묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
해결됨[코드캠프] 부트캠프에서 만든 '완벽한' 프론트엔드 코스
강의에 대해 질문이 있습니다.
안녕하세요 "부트캠프에서 만든 완벽한 프론트엔드 코스" 강의를 구매해서 열심히 듣고 있습니다. 강의소개에서 웹 프론트엔드 부트캠프 부분에 CRUD에 충실한 여행자 게시판 '트립토크'와 숙박상품을 구매할 수 있는 여행플렛폼이라고 나오는데 그렇다면 이 강의에 이 여행 플랫폼을 만드는 내용도 있나요?
-
해결됨한 입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지
배포 후 localstorage 지속 저장 안됨
안녕하세요! 완강하고 프로젝트 배포 끝내놓고 확인 도중 궁금한 점이 있어 질문 남깁니다. localstorage의 경우 사용자가 직접 삭제하지 않는 한 영구적으로 저장된다고 하였는데PC(window)에서 새 일기 작성 후 노트북(mac)에서 도메인 접근 시 데이터가 다 삭제되어 있습니다.또한, 도메인 접근 시 vercel 로그인 창이 현출되고 동일 계정으로 로그인 하면 데이터가 마찬가지로 매번삭제되어있습니다. PC 브라우저에서 해당 도메인 북마크 후 불러올 경우엔 데이터가 그대로 남아있습니다..따라서 현재 PC에서 접근 시 저장된 데이터가 현출되고 노트북에서 접근 시 데이터가 안보이는 상황입니다. 질문 : localstorage에 저장된 데이터는 어디에서든 같은 도메인으로 접속하면 똑같은 데이터가 보여야하는거 아닌가요? 그리고 프로젝트 도메인에 접근하려면 꼭 vercel 로그인이 필요한걸까요? 구글링을 해봐도 정확한 정보를 찾을 수 없어 문의드립니다. 배포는 강의와 동일하게 진행하였습니다.감사합니다.
-
해결됨[코드캠프] 부트캠프에서 만든 '완벽한' 프론트엔드 코스
AWS 배포 시 CORS 에러
"[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스강의" 를 수강하고 배포 부분을 이 강의를 수강하고 있는 수강생입니다. 고농축 강의에서 만든 포트폴리오를 aws에서 배포했을때에, CORS 에러가 다음과 같이 나는 문제가 있는데 어떻게 해결해야할까요? 찾아보니 백엔드에서 CORS 를 허용해야하거나 프론트에서 프록시를 사용하라고 되어있는데 어떻게 해결해야할지 모르겠네요
-
미해결한 입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지
페이지 라우팅 동적 경로 질문
Home.jsx 에서import { useSearchParams } from "react-router-dom"; const Home=()=>{ const [params, setParams]=useSearchParams(); console.log(params.get("value")); return <div>Home</div>; }; export default Home;이렇게 작성했는데 사진과 같이 빨간색 글씨가 뜨는데 어디가 틀린걸까요?? 출력에는 문제가 없습니다
-
해결됨한 입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지
react-rounter-dom v7 버전 업데이트
안녕하세요! 해당 강의는 react-rounter-dom v6.22 이던데 혹시 v7로 강의 업데이트 예정이실까요?정환님이 말아주시는 리라돔 v7 강의는 어떨지 하여 기대감에 여쭤봅니다!
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 쇼핑몰 사이트 만들기[전체 리뉴얼]
tailwindcss를 vite에서 이용하는 방식이 바뀐것 같습니다.
npx init ~~ 를 실행하면 에러가 자꾸 발생해서, 웹사이트를 가보니 다운받는 방식이 아예 바뀐 것 같습니다.
-
해결됨한 입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지
새로고침시 404에러가 뜹니다
수정페이지, 새일기작성페이지, 등새로고침하면 404 에러가 뜹니다 ㅠㅠ vercel : https://emotion-diary-ochre-six.vercel.app/ 확인 부탁드립니다 ㅠㅠ
-
미해결파이썬/장고 웹서비스 개발 완벽 가이드 with 리액트 (장고 4.2 기준)
Django-Components의 0.128 세팅
최신 버전에선 강의의 설정을 적용할 수 없습니다. 아래의 것을 참고하세요. (강사님 이렇게 해도 되긋죠? 구조 제대로 이해 못한채 chatgpt에게 물으면서 했네요 ㅎㅎ; 강의 유지보수 하시기 힘드시겠어요. )django_components 0.128 설정1. 폴더명 및 트리구조 변경.myproj/├── core/│ ├── init.py│ ├── apps.py│ ├── src_django_components/ * 폴더명 변경. 하이픈 인식 못함.│ │ ├── init.py│ │ ├── modal_form.py * 상위로 이동│ │ ├── modal_form/│ │ │ ├── modal_form.html│ │ │ ├── modal_form.css│ │ │ ├── modal_form.js├── mysite/│ ├── settings.py│ ├── urls.py├── manage.py 2. settings.py INSTALLED_APPS = [ ..., 'django_components',]MIDDLEWARE = [ ..., "django_components.middleware.ComponentDependencyMiddleware", ]STATICFILES_FINDERS = [ "django.contrib.staticfiles.finders.FileSystemFinder", "django.contrib.staticfiles.finders.AppDirectoriesFinder", "django_components.finders.ComponentsFileSystemFinder", ]TEMPLATES = [ ..., "DIRS": [BASE_DIR / "core" / "src_django_components"], ], "OPTIONS": { "context_processors": [ "django.template.context_processors.debug", "django.template.context_processors.request", "django.contrib.auth.context_processors.auth", "django.contrib.messages.context_processors.messages", ], "builtins": [ "django_components.templatetags.component_tags", # 추가된 부분 ], ...,STATICFILES_DIRS = [BASE_DIR / "core" /"src_django_components"]COMPONENTS = ComponentsSettings( dirs=[ Path(BASE_DIR) / "core" / "src_django_components", ]) 3. core/apps.py-modal_form 등록from django.apps import AppConfigfrom django_components import componentclass CoreConfig(AppConfig): default_auto_field = "django.db.models.BigAutoField" name = "core" def ready(self): from .src_django_components.modal_form import ModalForm component.registry.register("modal_form", ModalForm) # 설명: ModalForm 클래스를 modal_form 이름으로 등록합니다.
-
해결됨한 입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지
useRef inputRef.current값이 무조건 bio로만 나오는 현상이 있습니다.
const inputRef = useRef() const onSubmit = () => { if(input.name === "" ){ console.log(inputRef.current) inputRef.current.focus() } } return ( <div> <div> <input ref={inputRef} name="name" value={input.name} onChange={onChange} type="text"/> </div> <div> <input ref={inputRef} name="birth" value={input.birth} onChange={onChange} type="date" /> </div> <div> </div> <div> <textarea ref={inputRef} name="bio" value={input.bio} onChange={onChange} > </textarea> </div> <button onClick={onSubmit}>제출</button> </div> )위와같은 코드에서 onSubmit함수내 console.log(inputRef.current)를 해보면 무조건 bio만 출력됩니다. 또한 포커스도 어떤 경우에서든 bio가 있는 textarea쪽으로만 포커싱이 됩니다. 어떤 이유에서 이러한 현상이 발생되는지 궁금합니다.
-
해결됨너네 백엔드 하고 싶은 거 있으면 얼마든지 해 난 괜찮어 왜냐면 나는 파이어베이스가 있어
displayName 에 대해 질문있습니다.
안녕하세요 강의를 너무 잘 보고 있습니다 강의를 보다가 궁금한 점이 파이어베이스 프로젝트 설정 강의 부분에서 displayName이라는 state를 작성했는데 이건 파이어베이스에 약속된 이름이라고 하셨는데 그럼 닉네임 할때만 이 이름으로 작성하면 되는 건가요?
-
미해결Next + React Query로 SNS 서비스 만들기
cache 질문
이전 faker 를 사용했을 때 이미지가 바뀌는 문제때문에 getPostRecommend 함수 부분에 cache : "force-cache" 를 작성하셨었는데 실제 데이터를 받아오는 현시점에선 cache:"no-store" 를 작성하는게 맞을까요 ?
-
미해결파이썬/장고 웹서비스 개발 완벽 가이드 with 리액트 (장고 4.2 기준)
질문 아님.
리눅스로 하느라 힘들다..공식 문서 언제 다 읽고어떻게 선별적으로 잘 읽는지 GPT 없던 시절 .. .대단하다.
-
미해결Next + React Query로 SNS 서비스 만들기
서버 액션과 api route의 차이가 어떤게 있을까요?
안녕하세요! 강의 도중 궁금한게 생겨 여쭤보기 위해 질문 드립니다!다름이아니라, 서버 액션과 api route의 차이가 속도 말고 어떤 때에 서버 액션을 써야하고, api route를 사용해야하는지 여쭤보고싶습니다!찾아본 바로는 서버 액션은 POST, PATCH 등 폼 제출 시에 사용하는 것이라는데, 폼 제출 시에는 무조건 서버액션을 사용하는 것이 맞는지, 아니라면 단지 개발자 판단 하에 사용하면 되는 것인지 여쭤보고싶습니다!
-
미해결Next + React Query로 SNS 서비스 만들기
세션 만료로 인해 미들웨어에서 로그인 페이지로 redirect 되는 경우 발생하는 오류.(인터셉팅 라우트)
로그인하여 /home에 접속해 있는 도중, 세션이 만료된 상태에서 사용자 정보가 필요한 /message 또는 /explore 등으로 클라이언트 네비게이션을 통해 페이지를 이동하는 경우,미들웨어의 세션 검사를 거쳐 로그인 페이지로 이동되지 않고 not-found 페이지가 뜨는 오류가 있습니다./ / middleware.tsimport { 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를 찾지 못하는 것으로 보이는데 정확한 원인을 알 수 없어 문의 드립니다.
-
미해결파이썬/장고 웹서비스 개발 완벽 가이드 with 리액트 (장고 4.2 기준)
mydjango.py 실습 질문있습니다.
return HttpResponse(""" <!doctype html> <html lang="ko"> <head> <meta charset="UTF-8" /> <title>Melon List</title> <style> body { width: 400px; margin: 0 auto; } table { width: 100%%; border-collapse: collapse; } table, th, td { border: 1px solid black; } </style> </head> <body> <h1>Melon List</h1> <table> <thead> <tr><th>팀명</th><th>순위</th></tr> </thead> <tbody> %s </tbody> </table> </body> </html> """ % (partial_html,))여기에서 굳이 % (partial_html)) 또 잘 실행 되는데 % (partial_html,)) 쉼표를 사용하는 이유는 정확하게 뭔지 알 수 있을까요? gpt는 튜플로 만든다고 설명 해주었는데 td안에 튜플로 넣는 이유를 알고 싶습니다.
-
해결됨한 입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지
강의 사용 도구관련해서 질문드립니다
정말 친절하고 세세한 강의~ 감동 받으면서 잘 듣고 있습니다.한가지 궁금한 점은..강사님은 Vite로 강의하시는데.. Create React App도구를 사용하는 것과 차이가 많이 있을까요?Create React App으로 강의를 들어도 무방한지도 알고 싶습니다.감사합니다^^
-
미해결한 입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지
TodoItem 리렌더링 질문..
import "./TodoItem.css"; import { memo } from "react"; const TodoItem = ({ id, isDone, content, date, onUpdate, onDelete }) => { const onChangeCheckbox = () => { onUpdate(id); }; const onClickDeleteButton = () => { onDelete(id); }; return ( <div className="TodoItem"> <input onChange={onChangeCheckbox} //button이 아닌 input태그이기 때문에 onChange를 사용 readOnly checked={isDone} type="checkbox" /> <div className="content">{content}</div> <div className="date">{new Date(date).toLocaleDateString()}</div> <button onClick={onClickDeleteButton}>삭제</button> </div> ); }; export default memo(TodoItem, (prevProps, nextProps) => { // 반환값에 따라, Props가 바뀌었는지 안바뀌었는지 판단 // T -> Props 바뀌지 않음 -> 리렌더링 X // F -> Props 바뀜 -> 리렌더링 O if (prevProps.id !== nextProps.id) return false; if (prevProps.isDone !== nextProps.isDone) return false; if (prevProps.content !== nextProps.content) return false; if (prevProps.date !== nextProps.date) return false; return true; // 네 개의 값이 바뀌지 않으면 });코드를 따라 치면서 실습을 했는데 위처럼 바꿔도 모든 list가 리렌더링된다고 하이라이트가 뜹니다. 뭐가 문제인지 모르겠습니다ㅜㅜ
-
해결됨[자바스크립트부터 리액트까지] 포기없는 React로 가는 길 [Full vers.]
맥북 여러줄 단축키
안녕하세요 /* */ 맥북에서의 여러줄 주석 처리 단축키 알려주세요.
-
미해결React 완벽 마스터: 기초 개념부터 린캔버스 프로젝트까지
npx create-react-app cra-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 %
-
미해결기초부터 배우는 Next YTMusic 클론 코딩 (with next.js 14, UI 마스터)
3.2, 3.3 화면에 아무것도 나오지 않고 있습니다!