묻고 답해요
161만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스
refetchQueries 질문
안녕하세요.강의를 복습하던 도 중 궁금한게 생겨서 질문 드립니다.onClick={qqq}으로 버튼을 클릭시 5개 정도의 데이터가 refetchqueries 되어야 하는데 모두 다 쓰면 비효율적 인 듯 합니다.많은 데이터가 refetch되어야 할 때 페이지가 새로고침 되는것이 낫다고 생각 하는데.. 1.새로고침을 한다면 어떤식으로 코드를 써야하나요?2. 둘 중 어느것이 더 효율적일까요.
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스
api 질문입니다.
포토폴리오 마이페이지 - 내포인트 부분을 작업하는 도중 api 질문입니다.fetchPointTransactionsOfBuying 이 내포인트 -> 구매내역 api로 알고있습니다.피그마를 보면 거기서 판매자 데이터를 가져오고있는데 오류가 뜨네요.ㅠ판매자 데이터를 가져오고 싶은데 여기서 seller {name} 이부분을 넣으면 데이터가 안가져오네요..판매자데이터가 없어서 그런건지 왜 그런지와 어떻게 해야하는지 두가지 모두 알고싶습니다.
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스
회원 가입을 위해 정보를 입력해주세요 과제 정답지 어디가면 알 수 있나요?!
display-flex; 이게 안먹혀서 position을 주고 했는데<!DOCTYPE html> <html lang="ko"> <head> <title>회원가입</title> <!-- <link href="homework01.css" rel="stylesheet"> --> <style> .box{ position: absolute; top: 60px; left: 625px; width: 670px; height: 960px; border: 1px solid #AACDFF; border-radius: 20px; box-shadow: 7px 7px 39px 0px #0068FF40; } .head{ position : fixed; top: 132px; left: 725px; width: 466px; height: 94px; color: #0068FF; } .head2{ position : fixed; top: 286px; left: 725px; width: 158px; height: 23.65px; color: #797979; } .head3{ position : fixed; top: 387px; left: 725px; width: 158px; height: 23.65px; color: #797979; } .head4{ position : fixed; top: 488px; left: 725px; width: 158px; height: 23.65px; color: #797979; } .head5{ position : fixed; top: 589px; left: 725px; width: 158px; height: 23.65px; color: #797979; } .wo{ position : fixed; top: 719x; left: 850px; width: 200px; height: 23.94px; color: #797979; } .man{ position : fixed; top: 719x; left: 1000px; width: 200px; height: 23.94px; color: #797979; } .ch{ position : fixed; top: 793x; left: 738px; width: 509px; height: 21px; color: #797979; font-size: 13px; } .box2{ position: fixed; top: 895px; left: 725px; width: 470px; height: 75px; border: 1px solid #0068FF; border-radius: 10px; } .text{ position : fixed; top: 899x; left: 925px; width: 70px; height: 27px; color: #0068FF; } </style> </head> <body> <div class="box"> <div class="head"><h1>회원 가입을 위해<br> 정보를 입력해주세요</h1> <div class="head2">*이메일 </div> <div><br><br></div><br><br><hr> <div class="head3">*이름 </div> <div><br><br></div><br><br><hr> <div class="head4">*비밀번호 </div> <div><br><br></div><br><br><hr> <div class="head5">*비밀번호 확인</div> <div><br><br></div><br><br><hr> <br><br> <div class="wo"><input type="radio" name="gender">여성</div> <div class="man"><input type="radio" name="gender">남성</div> <br><br><br><br> <div class="ch"><input type="checkbox">이용약관 개인정보 수집 및 이용, 마케팅 활용 선택에 모두 동의합니다.</div> <div><br><br></div><hr> <br><br> <div class="box2"> <div class="text"><br>가입하기</div> </div> </div> </body> </html>이렇게 코드로 모양만 갖췄는데 어려워서 코드리뷰를 하고싶어서 그러는데 정답지가 있나요?
-
해결됨[리뉴얼] React로 NodeBird SNS 만들기
redux thunk 원리 질문
1.thunk를 사용하면 함수형 action을 dispatch 했을때action을 단순히 실행하는 것으로 보이는데요. 그렇다면 아래 두 코드처럼함수형 action을 dispatch하는 방식과 함수로 감싸지 않고 하는 방식과 결과는 같다고 생각되는데 맞나요?const loginAction = () => { return (dispatch) => { dispatch(loginRequestAction()); axios.post('/api/login') .then((res) => { dispatch(loginSuccessAction(res.data)); }) .catch((err) => { dispatch(loginFailureAction(err)); }) } } const onClickLogin = () => { dispatch(loginAction()); }const onClickLogin = () => { dispatch(loginRequestAction()); axios.post('/api/login') .then((res) => { dispatch(loginSuccessAction(res.data)); }) .catch((err) => { dispatch(loginFailureAction(err)); }) }2.1이 맞다면 함수 action을 dispatch하는 방식은 편의성 때문이라고 봐도 될까요?3.강의 10:40 쯤에 thunk는 한번에 dispatch를 여러번 할 수 있게 해준다고 하셨는데thunk없이 아래처럼 여러번 쓰는 것은 문제가 될 수 있나요?// action은 임의로 지었습니다 const onClickButton = () => { dispatch({type: 'CHANGE_ID'}); dispatch({type: 'CHANGE_PASSWORD'}); }
-
미해결Slack 클론 코딩[백엔드 with NestJS + TypeORM]
채팅 서버 통신 구조 설계 및 DB 관리 방법이 궁금합니다.
안녕하세요, 사내에서 채팅 프로젝트를 진행하게 되어 강의를 신청해 수강 중에 있습니다.( 채팅은 대규모 서비스를 전제로 하고 있지만, 현재는 상담사와 고객의 1:1 상담을 먼저 진행할 예정입니다. )관련해서 두가지 질문이 있습니다!(1) 채팅 서버 통신 구조 설계: 팀원들과 함께 이야기를 나눠볼 때, Socket으로 채팅 히스토리를 조회하거나 채팅 내용을 저장할 수 있지 않을까? 라는 이야기가 나왔습니다. 강의에서 채팅 서버 통신 구조를 설계할 때, 제로초님께서는 HTTP와 Socket을 혼합해서 사용하고 계시는데요. HTTP와 Socket을 함께 사용하시는 이유가 있는지 궁금합니다. 또한, 대규모 서비스로 전환 될 것을 전제하며 실제 서비스를 설계할 때는 어떤 방식이 더 나은지 궁금합니다.(2) DB 관리 : 채팅 히스토리를 관리하는 방법을 두가지로 고민중에 있습니다. 저장 DB는 mongoDB를 생각 중에 있습니다. (A. 인메모리에 저장해두었다가 주기적으로 DB에 저장 B. 건마다 DB에 저장) 개인 적으로는 A방법을 진행했을 때, 데이터 유실이 우려되어 B방법이 더 나은 옵션이지 않을까 생각하지만, 빈번한 DB접근이 우려됩니다. 제로초님은 어떤 방식으로 관리하고 계신지 조언주시면 감사하겠습니다!
-
미해결비전공자를 위한 진짜 입문 올인원 개발 부트캠프
Fly.io도 유료로 전환이 된걸까요
Fly.io 설치 후 홍콩으로 선택하는 지점(강의 4:17)에서 하기와 같은 오류가 뜨고있습니다.에러 내용이 Error: We need your payment information to continue! Add a credit card or buy credit: https://fly.io/dashboard/kimyr6868-gmail-com/billing 결제수단을 입력하는 내용으로 보아 진행이 어려울 것 같은데 이런 상황에선 어떻게 하면 좋을지 문의드립니다!
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
sequlize같은 orm에 대한 질문
javascript는 sequilize java는 JPA같은 데이터베이스를 다루는 ORM이 있는 것 같은데 ORM에 대해 좀더 찾아보니 sql 쿼리문을 직접 작성하는 것보다 코드의 양도 줄고 유지 보수도 더 쉬운 것 같습니다.나중에 sql 쿼리문을 직접 입력하는 방식을 배워야하나 생각이 들었지만 이렇게 장점이 많은 ORM을 안 쓸 이유가 없는 것 같고 나중에 다른 백앤드 프레임 워크 예를 들어 java Spring같은 것을 배워도 JPA같은 ORM을 배우지 sql 쿼리문을 직접 넣는 방식으로는 하지 않을꺼 같습니다.그럼에도 불구하고 sql 쿼리문을 직접 넣는 방식을 배워둘 필요가 있을까요? 아니면 ORM방식에 단점이 있을까요?
-
미해결한 입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지
onClick 사용시 질문입니다!
onClick를 이용할경우 onClick= { ( ) => ?? } 해당 형식으로 사용해야하는 경우가 있고 아닌경우가 있는데 헷갈리네요 ㅜㅜ 클릭할떄 실행되는함수가 파라미터를 받지않는다면 onClick={함수명} 이런식이고 파라미터를 받는다면 onClick={( )=>함수명( 파라미터 )} 이런식인거같은데 다른경우도 있을까요?? 콜백 함수에 관한 영상을 찾아보면 이해가 될까요??
-
해결됨[리뉴얼] React로 NodeBird SNS 만들기
state is not defined 에러가 뜹니다
이 에러는 왜 발생한 건가요?구글에 검색도 해봤는데 안나오네요도와주세요 ㅠreducers/user.js 코드입니다export const initialState = { } export const loginAction = (data) => { return { type: 'LOG_IN', data, } } export const logoutAction = () => { return { type: 'LOG_OUT', } } const reducer = (State = initialState, action) => { switch (action.type) { case 'LOG_IN': { return { ...state, isLoggedIn: true, user: action.data, }; } case 'LOG_OUT': { return { ...state, isLoggedIn: false, user: null, }; } default: return state; } }; export default reducer; 터미널창 오류 메세지 입니다error - reducers/user.js (37:12) @ reducererror - ReferenceError: state is not defined at reducer (webpack-internal:///./reducers/user.js:39:13) at /Users/hyeonyeongjeong/Documents/2023project/nodebird/prepare/front/node_modules/redux/lib/redux.js:476:24 at Array.forEach (<anonymous>) at assertReducerShape (/Users/hyeonyeongjeong/Documents/2023project/nodebird/prepare/front/node_modules/redux/lib/redux.js:474:25) at combineReducers (/Users/hyeonyeongjeong/Documents/2023project/nodebird/prepare/front/node_modules/redux/lib/redux.js:539:5) at eval (webpack-internal:///./reducers/index.js:15:75) at Object../reducers/index.js (/Users/hyeonyeongjeong/Documents/2023project/nodebird/prepare/front/.next/server/pages/_app.js:33:1) at __webpack_require__ (/Users/hyeonyeongjeong/Documents/2023project/nodebird/prepare/front/.next/server/webpack-runtime.js:33:42) at eval (webpack-internal:///./store/configureStore.js:9:67) at Object../store/configureStore.js (/Users/hyeonyeongjeong/Documents/2023project/nodebird/prepare/front/.next/server/pages/_app.js:66:1) { page: '/'} 35 | } 36 | default:> 37 | return state; | ^ 38 | 39 | } 40 | };event - compiled client and server successfully in 100 ms (1518 modules)4. WrappedApp created new store with withRedux(NodeBird) { initialState: undefined, initialStateFromGSPorGSSR: undefined }ReferenceError: state is not defined at reducer (webpack-internal:///./reducers/user.js:39:13) at /Users/hyeonyeongjeong/Documents/2023project/nodebird/prepare/front/node_modules/redux/lib/redux.js:476:24 at Array.forEach (<anonymous>) at assertReducerShape (/Users/hyeonyeongjeong/Documents/2023project/nodebird/prepare/front/node_modules/redux/lib/redux.js:474:25) at combineReducers (/Users/hyeonyeongjeong/Documents/2023project/nodebird/prepare/front/node_modules/redux/lib/redux.js:539:5) at eval (webpack-internal:///./reducers/index.js:15:75) at Object../reducers/index.js (/Users/hyeonyeongjeong/Documents/2023project/nodebird/prepare/front/.next/server/pages/_app.js:33:1) at __webpack_require__ (/Users/hyeonyeongjeong/Documents/2023project/nodebird/prepare/front/.next/server/webpack-runtime.js:33:42) at eval (webpack-internal:///./store/configureStore.js:9:67) at Object../store/configureStore.js (/Users/hyeonyeongjeong/Documents/2023project/nodebird/prepare/front/.next/server/pages/_app.js:66:1) http://localhost:3060 에 뜬 오류 입니다 Server ErrorReferenceError: state is not definedThis error happened while generating the page. Any console logs will be displayed in the terminal window.Sourcereducers/user.js (35:12) @ reducer 33 | } 34 | default: > 35 | return state; | ^ 36 | 37 | } 38 | };
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 기본 강의
깃허브
PS C:\Users\user\Documents\boiler-plate> git push -u origin mainfatal: failed to load library 'libcurl-4.dll'이럴 경우엔 어떻게 깃허브 연결 할 수 있을까요?
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스
ApolloError: null value in column "writer" of relation "board" violates not-null constraint
하드코딩으로 값을 넣었을때는 잘진행이 되었는데요ㅠㅠ 안에 값을 지정하니 에러가 계속뜨네요 아마 이 부분 에서 고쳐야 할 점이 있는 것 같은데 똑같이 작성을 한 것 같음에도 동작이 안되서 질문드려봅니다
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스
윈도우 WSL 에서 yarn dev 후에 수정한 index.js 반영
브라우저에서 새로고침해도 수정된 index.js가 반영이 안되던데 왜그러는걸까요 ㅠ
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스
과제가 노션에 있는 이미지인가요 영상에 나오는 이미지인가요?
이거 인가요? 피그마파일인가요? 둘중에 상관 없는거죠?
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스
훈훈한 자바스크립트 반복문파트 스크립트 태그의 위치 질문
저는 버튼을 누르면 텍스트 출력은 오류, 콘솔 출력은 null이 뜹니다 원인이 뭐죠? index.html<!DOCTYPE html> <html lang="ko"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>D-Day-count</title> <link rel="stylesheet" href="./style.css" /> <script src="./script.js"></script> </head> <body> <h1>D-Day</h1> <div id="d-day-container"> <div class="d-day-child-container"> <span id="days">0</span> <span>일</span> </div> <div class="d-day-child-container"> <span id="hours">0</span> <span>시간</span> </div> <div class="d-day-child-container"> <span id="min">0</span> <span>분</span> </div> <div class="d-day-child-container"> <span id="sec">0</span> <span>초</span> </div> </div> <div id="d-day-meassage"></div> <div id="target-selector id"> <input id="target-year-input" class="target-input" size="5" /> - <input id="target-month-input" class="target-input" size="5" /> - <input id="target-date-input" class="target-input" size="5" /> </div> <button onclick="counterMaker()" id="start-btn">카운트다운 시작</button> </body> </html> script.js // const obj = { // name: "Jason", // age: 25, // }; // if (obj.name === "Jason" || obj.age === 25) { // console.log("안녕, " + obj.name + ", 너의 나이는 " + obj.age); // } else { // console.log("넌 우리 멤버가 아니다."); // } const dateFormMaker = function () { const inputYear = document.querySelector("#target-year-input").value; const inputMonth = document.querySelector("#target-month-input").value; const inputDate = document.querySelector("#target-date-input").value; // const dateFormat = inputYear + '-' + inputMonth + '-' + inputDate; const dateFormat = `${inputYear}-${inputMonth}-${inputDate}`; //템플릿 리터럴 return dateFormat; }; const counterMaker = function () { const messageContainer = document.querySelector("#d-day-message"); console.log(messageContainer); messageContainer.textContent = "D-Day를 입력해주세요."; const targetDateInput = dateFormMaker(); const nowDate = new Date(); const targetDate = new Date(targetDateInput).setHours(0, 0, 0, 0); const remaining = (targetDate - nowDate) / 1000; // 만약, remaining === 0 라면, 타이머가 종료되었습니다. 출력 if (remaining <= 0) { console.log("타이머가 종료되었습니다."); } else if (isNaN(remaining)) { //만약, 잘못된 날짜가 들어왔다면, 유효한 시간대가 아닙니다. 출력 console.log("유효한 시간대가 아닙니다."); } const remainingDate = Math.floor(remaining / 3600 / 24); //몇일 남았는지 구하기 const remainingHours = Math.floor(remaining / 3600) % 24; //몇 시간 남았는지 구하기 const remainingMin = Math.floor(remaining / 60) % 60; //몇 분 남았는지 구하기 const remainingSec = Math.floor(remaining) % 60; //몇 초 남았는지 구하기 console.log(remainingDate, remainingHours, remainingMin, remainingSec); };
-
미해결MERN STACK 커뮤니티 : 시작부터 배포까지 알려주는 React
Detail.js CSS 관련 강의가 없어진거 같은데요 ?
Update : 게시글 수정하기 강의 들을 차례인데 DetailCSS 부분은 강의 내용이 없는데 값자기 다 적용된체로 수업이 진행 되네요 흐름상 강의가 빠진거 같은데요 ?
-
미해결MERN STACK 커뮤니티 : 시작부터 배포까지 알려주는 React
504 에러
안녕하세요 Reple Upload 파트 에서 에러가 504 에러가 발생 해서 질문드립니다Server -> Router -> reple.js 측에서 20번줄에서 에러가 나고 있는데, terminal에서 더이상 .save callback 을 할수 없다고 뜹니다프론트 쪽에서는 이러한 에러가 뜨고 있는데요 지금 서버랑, 프론트쪽 연결이 되지 않은거 같은데요 어떻게 해결할수 있을까요? 감사합니다mongoose 다운그레이드 해서 해결했습니다
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스
회원가입 과제
안녕하세요! 회원가입 과제를 풀다가 막혀서 더 이상 진도를 못 나가고 있는 상황입니다. 섹션 7에 파이널 과제를 참고 하라고 하셨는데 회원가입 과제는 섹션7과 다르게 입력칸이 밑줄이라서 어떤 식으로 코드를 쳐야할지 감도 안 오는 상황입니다. 참고식이 아닌 회원가입 과제 부분 코드를 보고 싶은데 혹시 제가 정답 코드를 못 찾는거라면 링크를 첨부해주실 수 있으실까요?
-
미해결습관부터 바꿔주는 Node.js & Express 기초
prisma에서 (비)식별관계 설계
안녕하세요.강의를 보고 현재 첫 프로젝트를 진행중입니다. 전공자라서 이론적으로는 비식별관계와 식별관계에 대해서 인지한 상태인데, prisma로 식별관계를 설정하려면 어떻게 해야할까요? 구글링했는데도 답이 나오질 않네요ㅜㅜ
-
미해결[개정3판] Node.js 교과서 - 기본부터 프로젝트 실습까지
ejs, cjs 둘 중 무엇으로 코딩해야하나요?
ejs와 cjs 둘 중 express 프레임워크를 사용해서 프로그래밍을 하려면 어떤 방식을 추천하시나요?
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스
ApolloDriverConfig를 찾지를 못해요
import { Module } from '@nestjs/common'; import { BoardModule } from './apis/boards/boards.module'; import { GraphQLModule } from '@nestjs/graphql'; import { ApolloDriver } from '@nestjs/apollo'; @Module({ imports: [ BoardModule, GraphQLModule.forRoot<apolloDriverConfig>({ driver: ApolloDriver, autoSchemaFile: 'src/commons/graphql/schema.gql', }), ], }) export class AppModule {} yarn add @nestjs/graphql @nestjs/apollo graphql apollo-server-express 이거 추가하고 수업 따라서 진행하는데 apolloDriverConfig이놈만 찾지를 못하네요... 버전이 달라서 그런걸까요?