inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

172만명의 커뮤니티!! 함께 토론해봐요.

안녕하세요 setState 실행 순서가 조금 이상해서 질문남겨요...

미해결

따라하며 배우는 노드, 리액트 시리즈 - 유튜브 사이트 만들기

안녕하세요 양질의 수업을 무료로 오픈해주셔서 항상 공부 잘하고 있습니다. 이번에 클론 코딩 진행하면서 setState 부분이 조금 이상해서 질문 드려요 import React, { useEffect, useState } from 'react' import Axios from 'axios'; import { Row, Col, List, Avatar } from 'antd' function VideoDetailPage(props) { const videoId = props.match.params.videoId; const VideoVariable = { videoId: videoId }; const [Video, setVideo] = useState([]) useEffect(() => { Axios.post('/api/video/getVideo', VideoVariable) .then((res) => { if (res.data.success) { setVideo(res.data.video); console.log('state 업데이트 완료') } else { alert('비디오 정보 로딩 실패'); } }) }, []); if (Video.writer) { return ( <Row gutter={[16, 16]}> <Col lg={18} xs={24}> <div style={{ width: '100%', padding: '3rem 4em' }}> <video style={{ width: '100%' }} src={`http://localhost:5000/${Video.filePath}`} controls></video> <List.Item // actions={[<LikeDislikes video videoId={videoId} userId={localStorage.getItem('userId')} />, <Subscriber userTo={Video.writer._id} userFrom={localStorage.getItem('userId')} />]} > <List.Item.Meta avatar={<Avatar src={Video.writer && Video.writer.image} />} title={<a href="https://ant.design">{Video.title}</a>} description={Video.description} /> <div></div> </List.Item> {/* <Comments CommentLists={CommentLists} postId={Video._id} refreshFunction={updateComment} /> */} </div> </Col> <Col lg={6} xs={24}> side video {/* <SideVideo /> */} </Col> </Row> ) } else { console.log(Video, '후후') return <div> Loading... ?? </div> } } export default VideoDetailPage 이게 제 코드구요 실행하면 아래의 else 부분의 후후먼저 실행되고 위의 setVideo가 실행됩니다. 그래서 에러가 발생해 detail 페이지로 가지않고 다시 landing 페이지로 넘어옵니다 비동기 처리때문인가 싶어 setVideo를 콜백의 형태로 남겨서 동기처리 할수있다길래 해봐도 안되고, useEffect 아래 input 리스트에 Video를 넣어보기도 했는데 잘 안되네요 ㅠㅠ https://github.com/dnfwlxo11/mini_youtube 이게 제 풀 코드입니다. component 코드들이랑 index.js 코드랑 몇번이나 본지 모르겠어요 이유가 뭘까요?

  • nodejs
  • mongodb
  • redux
  • react
댓글 0 좋아요 0 조회수 286

Unexpected default export of anonymous function

미해결

따라하며 배우는 노드, 리액트 시리즈 - 기본 강의

아래와 같은 경고가 나타나서 질문드립니다. 선생님의 수업을 그대로 따라가고, 코드에도 오타가 없어 보이는데, React Hook를 활용하게 되면서 anonymous function을 쓰지 못해서, return또한 불가능해지고, 이것이 Auth & user_reducer.js에서 모두 나타나는 거 같은데, 무엇이 문제인지 도통모르겠습니다. 대부분의 것을 본인이 찾아서 해결해야하는 것이 개발자 강호의 도리인줄 알지만, 찾아도 답이 나오지 않아 질문 드립니다. 항상 감사드립니다. Compiled with warnings. [1] [1] src/_reducers/user_reducer.js [1] Line 7:1: Unexpected default export of anonymous function import/no-anonymous-default-export [1] Line 12:13: Unreachable code no-unreachable [1] Line 15:13: Unreachable code no-unreachable [1] Line 18:13: Unreachable code no-unreachable [1] [1] src/hoc/auth.js [1] Line 6:1: Unexpected default export of anonymous function import/no-anonymous-default-export [1] Line 33:12: React Hook useEffect has missing dependencies: 'dispatch' and 'props.history'. Either include them or remove the dependency array react-hooks/exhaustive-deps 혹시 몰라 깃허브 링크도 첨부드립니다. (https://github.com/jihyeonmun/Nodejs/tree/master/BoilerPlate/Code) P.s. 이 질문을 보시는 학생분들에게, 혹시나 도움이 되실까 싶어 마크다운 필기본도 공유드립니다. 설정 및 설치(https://github.com/jihyeonmun/Nodejs/tree/master/BoilerPlate/DownloadSetting) 세부 기능(https://github.com/jihyeonmun/Nodejs/tree/master/BoilerPlate/Functions) 리액트 부분(https://github.com/jihyeonmun/Nodejs/tree/master/BoilerPlate/React)

  • react
  • react-hook
  • nodejs
  • react
jhmoon1994 댓글 2 좋아요 2 조회수 705

첫 화면이 이상합니다.

미해결

따라하며 배우는 노드, 리액트 시리즈 - 유튜브 사이트 만들기

./src/_reducers/user_reducer.js Line 11:13: Unreachable code no-unreachable Line 14:13: Unreachable code no-unreachable Line 17:13: Unreachable code no-unreachable ./src/hoc/auth.js Line 2:8: 'Axios' is defined but never used no-unused-vars Line 33:12: React Hook useEffect has missing dependencies: 'dispatch' and 'props.history'. Either include them or remove the dependency array react-hooks/exhaustive-deps ./src/components/views/LoginPage/LoginPage.js Line 2:8: 'Axios' is defined but never used no-unused-vars ./src/components/views/RegisterPage/RegisterPage.js Line 4:8: 'Axios' is defined but never used no-unused-vars ./src/App.js Line 6:3: 'Link' is defined but never used no-unused-vars Search for the keywords to learn more about each warning. To ignore, add // eslint-disable-next-line to the line before. [HPM] Error occurred while trying to proxy request /api/hello from localhost:3001 to http://localhost:5000 (ECONNREFUSED) (https://nodejs.org/api/errors.html#errors_common_system_errors) [HPM] Error occurred while trying to proxy request /api/users/auth from localhost:3001 to http://localhost:5000 (ECONNREFUSED) (https://nodejs.org/api/errors.html#errors_common_system_errors) 터미널에 이렇게 뜨면서 시작을 하고 시작페이지와 버튼만 출력됩니다.

  • nodejs
  • react
  • redux
  • mongodb
짭인근 댓글 0 좋아요 0 조회수 472

안녕하세요 깃허브 업로드 관련 질문드립니다.

미해결

비전공자를 위한 진짜 입문 올인원 개발 부트캠프

안녕하세요! 이번에 강의 수강시작한 학생입니다. 다름이 아니라 혹시 강의중 공부했던 코드들 깃허브에 올려도 괜찮을까요? 깃허브에 올려서 틈틈히 복기하고싶은 목적입니다!

  • express
  • react-native
  • react
  • nodejs
  • javascript
  • 머신러닝 배워볼래요?
  • HTML/CSS
  • tensorflow
댓글 1 좋아요 1 조회수 268

boilerplate 다운로드 및 npm install 시 에러

해결됨

따라하며 배우는 노드, 리액트 시리즈 - 유튜브 사이트 만들기

아직 root 폴더에서 npm install 하는 단계입니다. 에러를 구글링하다보니 windows-build-tools 를 설치해야한다고해서, 관리자권한으로 powershell 실행해서 잘 설치했는데 해결되지 않아서요..ㅠㅠ 어떻게 해야할지 알려주실 수 있을까요? ++ 에러메시지 아래 추천으로 npm config set python 을 실행해봤지만 해결되지 않았습니다. node-pre-gyp WARN Using needle for node-pre-gyp https download node-pre-gyp WARN Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.8/bcrypt_lib-v3.0.8-node-v83-win32-x64-unknown.tar.gz node-pre-gyp WARN Pre-built binaries not found for bcrypt@3.0.8 and node@14.16.0 (node-v83 ABI, unknown) (falling back to source compile with node-gyp) gyp ERR! find Python gyp ERR! find Python Python is not set from command line or npm configuration gyp ERR! find Python Python is not set from environment variable PYTHON gyp ERR! find Python checking if "python" can be used gyp ERR! find Python - "python" is not in PATH or produced an error gyp ERR! find Python checking if "python2" can be used gyp ERR! find Python - "python2" is not in PATH or produced an error gyp ERR! find Python checking if "python3" can be used gyp ERR! find Python - "python3" is not in PATH or produced an error gyp ERR! find Python checking if the py launcher can be used to find Python 2 gyp ERR! find Python - "py.exe" is not in PATH or produced an error gyp ERR! find Python checking if Python is C:\Python27\python.exe gyp ERR! find Python - "C:\Python27\python.exe" could not be run gyp ERR! find Python checking if Python is C:\Python37\python.exe gyp ERR! find Python - "C:\Python37\python.exe" could not be run gyp ERR! find Python gyp ERR! find Python ********************************************************** gyp ERR! find Python You need to install the latest version of Python. gyp ERR! find Python Node-gyp should be able to find and use Python. If not, gyp ERR! find Python you can try one of the following options: gyp ERR! find Python - Use the switch --python="C:\Path\To\python.exe" gyp ERR! find Python (accepted by both node-gyp and npm) gyp ERR! find Python - Set the environment variable PYTHON gyp ERR! find Python - Set the npm configuration variable python: gyp ERR! find Python npm config set python "C:\Path\To\python.exe" gyp ERR! find Python For more information consult the documentation at: gyp ERR! find Python https://github.com/nodejs/node-gyp#installation gyp ERR! find Python ********************************************************** gyp ERR! find Python gyp ERR! configure error gyp ERR! stack Error: Could not find any Python installation to use gyp ERR! stack at PythonFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:307:47) gyp ERR! stack at PythonFinder.runChecks (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:136:21) gyp ERR! stack at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:225:16) gyp ERR! stack at PythonFinder.execFileCallback (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:271:16) gyp ERR! stack at exithandler (child_process.js:315:5) gyp ERR! stack at ChildProcess.errorhandler (child_process.js:327:5) gyp ERR! stack at ChildProcess.emit (events.js:315:20) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12) gyp ERR! stack at onErrorNT (internal/child_process.js:465:16) gyp ERR! stack at processTicksAndRejections (internal/process/task_queues.js:80:21) gyp ERR! System Windows_NT 10.0.19042 gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\김하영\\STUDY\\react\\react_study_2\\boilerplate-mern-stack-master\\node_modules\\bcrypt\\lib\\binding\\bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=C:\\김하영\\STUDY\\react\\react_study_2\\boilerplate-mern-stack-master\\node_modules\\bcrypt\\lib\\binding" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83" gyp ERR! cwd C:\김하영\STUDY\react\react_study_2\boilerplate-mern-stack-master\node_modules\bcrypt gyp ERR! node -v v14.16.0 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\김하영\STUDY\react\react_study_2\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\김하영\STUDY\react\react_study_2\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1) node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\김하영\STUDY\react\react_study_2\boilerplate-mern-stack-master\node_modules\node-pre-gyp\lib\util\compile.js:83:29) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1048:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) node-pre-gyp ERR! System Windows_NT 10.0.19042 node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\김하영\\STUDY\\react\\react_study_2\\boilerplate-mern-stack-master\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd C:\김하영\STUDY\react\react_study_2\boilerplate-mern-stack-master\node_modules\bcrypt node-pre-gyp ERR! node -v v14.16.0 node-pre-gyp ERR! node-pre-gyp -v v0.14.0 node-pre-gyp ERR! not ok Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\김하영\STUDY\react\react_study_2\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\김하 영\STUDY\react\react_study_2\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1) npm WARN react-redux@5.1.2 requires a peer of react@^0.14.0 || ^15.0.0-0 || ^16.0.0-0 but none is installed. You must install peer dependencies yourself. npm WARN react-redux@5.1.2 requires a peer of redux@^2.0.0 || ^3.0.0 || ^4.0.0-0 but none is installed. You must install peer dependencies yourself. npm WARN react-boiler-plate@1.0.0 No repository field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.12 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.12: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! bcrypt@3.0.8 install: `node-pre-gyp install --fallback-to-build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the bcrypt@3.0.8 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\jerem\AppData\Roaming\npm-cache\_logs\2021-04-26T00_37_15_758Z-debug.log

  • nodejs
  • mongodb
  • react
  • redux
Ha young, Kim 댓글 1 좋아요 0 조회수 325

dedupingInterval에 관련해서 질문드립니다!

미해결

Slack 클론 코딩[실시간 채팅 with React]

제가 이 강의를 듣고 이해한게 맞는지 궁금해서 질문올립니다! dedupingInterval을 사용하지 않으면 swr이 재요청 하는 기준이 다른 텝을 갔다가 오는 경우 재요청을 보내게 되고 dedupingInterval 옵션을 추가하게 되면 그 시간안에는 탭을 갔다와도 재요청을 보내지 않고 캐시해서 그대로 데이터를 사용하다가 그 시간이 끝나면 다시 재요청을 보내는 것이 맞는지 궁금합니다!

  • Socket.io
  • typescript
  • 웹팩
  • babel
  • react
  • 클론코딩
우동이 댓글 1 좋아요 2 조회수 713

안녕하세요! 타입스크립트 관련 질문있습니다. ㅎㅎ

미해결

Slack 클론 코딩[실시간 채팅 with React]

타입스크립트에서 함수컴포넌트를 만들때 const Test: React.FC = () => {} 이런식으로 작성하는것을 많이 보았는데 const Test = () => {} 이런식으로 React.FC을 생략해주는것이 좋은방식인가요???

  • 타입스크립트
  • babel
  • react
  • typescript
  • Socket.io
  • 웹팩
  • 클론코딩
댓글 2 좋아요 0 조회수 327

application 에러가 발생하는 이유가 뭘까요...

해결됨

비전공자를 위한 진짜 입문 올인원 개발 부트캠프

heroku에 서버 배포한 후 링크에 접속하면 application error라는 화면과 함께 heroku logs --tail라는 명령어를 사용해 에러내역을 확인할 수 있다는 설명이 나오는데요 명령어를 치면 아래와 같은 에러 로그가 나옵니다.. at= error code= H10 desc=" App crashed" method=GET path="/" 여기저기 찾아보면서 package.json scripts에 heroku-postbuild 추가하기 package.json engine에 node와 npm 버전을 입력하기 heroku 빌드팩 변경하기 heroku restart하기 procfile 생성하여 web:node index.js 입력하기 이외에도 여러 방법을 다 시도해봐도 해결이 안되네요...

  • react-native
  • nodejs
  • express
  • HTML/CSS
  • javascript
  • tensorflow
  • 머신러닝 배워볼래요?
  • react
댓글 1 좋아요 1 조회수 1065

Login에서 mutate 대신 revalidate를 써야 하네요.

미해결

Slack 클론 코딩[실시간 채팅 with React]

저번에 mutate를 이용해서 서버에서 가져오는 데이터를 바로 data에 집어 넣는 식으로 했었는데, 그걸 유지했더니 리다이렉트 할때 에러가 나는 군요. .then((response) => { mutate(response.data) }) 리다이렉트를 할 때 워크스페이스 페이지가 열림과 동시에 user를 가져와야 에러가 안 생기는데, mutate를 쓰면 워크스페이스 페이지가 열릴 때 서버에 요청을 안보내네요... 그래서 실습 코드 뒤져보다가 revalidate를 쓴 걸 보고 revalidate를 쓰도록 코드를 수정했더니 workspace 들어가자마자 user 요청을 보내네요. 아직 알쏭달쏭 합니다. swr은 로컬 스토리지를 쓸때 디버깅을 하기가 어려운 것 같아요.

  • typescript
  • Socket.io
  • react
  • 웹팩
  • babel
  • 클론코딩
이상욱 댓글 2 좋아요 2 조회수 349

504 에러 발생

미해결

따라하며 배우는 노드, 리액트 시리즈 - 유튜브 사이트 만들기

Failed to load resource: the server responded with a status of 504 (Gateway Timeout) Uncaught (in promise) Error: Request failed with status code 504 이 2개의 콘솔 에러가 발생합니다 어떻게 해결해야 하나요?

  • redux
  • nodejs
  • react
  • mongodb
mnm0350 댓글 6 좋아요 0 조회수 4907

reducer action HYDRATE

미해결

[리뉴얼] React로 NodeBird SNS 만들기

안녕하세요 강의중에 HYDRATE 설정 후 defalut: return state; 로 오류 해결 안내주신 후에 HYDRATE에 대한 설명이 없어서 HYDRATE 가 어떤 것이고 왜 사용되는지 알 수 있을까요?

  • hydrate
  • express
  • react
  • react
  • reducer
  • nodejs
  • redux
  • Next.js
임성규 댓글 2 좋아요 0 조회수 291

코드 오류

해결됨

비전공자를 위한 진짜 입문 올인원 개발 부트캠프

안녕하세요 선생님.. 밑에 사진을 보면 알 수 있겠지만 선생님이 이 전 강의에서 예시로 작성하신 코드에다가 <Script ~~ /> 이 태그를 복습 겸해서 다시 사용해볼려고 했는데 사진처럼 Script로 다른 Aleart("~");이 있는 JS파일을 불러와서 저장하고 브라우저에서 봤는데 아무것도 안뜨고 하얀 화면 밖에 없는데 코드에 무슨 오류가 있길래 실행이 안되는 거에요ㅜㅜ?

  • express
  • react
  • 머신러닝 배워볼래요?
  • nodejs
  • tensorflow
  • react-native
  • javascript
  • HTML/CSS
댓글 2 좋아요 1 조회수 350

credential 관련 문제

해결됨

따라하며 배우는 노드, 리액트 시리즈 - 챗봇 사이트 만들기

혹시 ㅅ해결하신 분들어떻게 ㅎㅏ셨을까요??? 포스트맨 에서는 게속 sending request 중이고요.. PS C:\Users\dbsgh\chatbot-app-master\chatbot-app-master> set GOOGLE_APPLICATION_CREDENTIALS=Users\dbsgh\chatbot-app-master\chat-app-test-iipa-6dc37356f180.json PS C:\Users\dbsgh\chatbot-app-master\chatbot-app-master> npm run start > chatbot-app@1.0.0 start C:\Users\dbsgh\chatbot-app-master\chatbot-app-master > node index.js Server Running at 5000 (node:17964) UnhandledPromiseRejectionWarning: Error: Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started for more information. at GoogleAuth.<anonymous> (C:\Users\dbsgh\chatbot-app-master\chatbot-app-master\node_modules\google-auth-library\build\src\auth\googleauth.js:167:23) at Generator.next (<anonymous>) at fulfilled (C:\Users\dbsgh\chatbot-app-master\chatbot-app-master\node_modules\google-auth-library\build\src\auth\googleauth.js:19:58) at process._tickCallback (internal/process/next_tick.js:68:7) (node:17964) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:17964) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

  • nodejs
  • react
Hoi 댓글 2 좋아요 0 조회수 436

https적용

미해결

[리뉴얼] Node.js 교과서 - 기본부터 프로젝트 실습까지

apache reverse_proxy로 node서버를 SSL인증서와 같이 도메인을 돌리고있는데요 ssl.conf파일엔 아래처럼 설정되어있고 ... ProxyPass / http:localhost:3000/ ProxyPassReverse / http:localhost:3000/ ... RewriteEngine on RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC] RewriteCond %{HTTP:CONNECTION} ^Upgrade$ [NC] RewriteRule .* ws://localhost:3000&{REQUEST_URI} [P] vhost.conf 에서는 해당 도메인으로 요청시 Redirect / https://해당도메인 으로 설정해놓았는데 이런경우에는 nodejs에도 https로 같이 구현을 해주어야 할까요? 현재는 그냥 http2가 아닌 http로 구성되어있습니다

  • apache
  • nodejs
  • https
  • mysql
  • mongodb
  • Sequelize
limseokyu 댓글 1 좋아요 0 조회수 317

TEST 폴더는 뭐죠?

미해결

비전공자를 위한 진짜 입문 올인원 개발 부트캠프

grab-market-web 폴더에서 TEST로 바뀌었는데 TEST폴더로 시작하나요? npm install 다시 해야 하나요?

  • react-native
  • 머신러닝 배워볼래요?
  • express
  • react
  • HTML/CSS
  • nodejs
  • tensorflow
  • javascript
카드캐슬CardCastle 댓글 2 좋아요 2 조회수 335

안녕하세요. 프론트엔드 세팅하기 챕터 질문입니다.

미해결

Slack 클론 코딩[실시간 채팅 with React]

안녕하세요 zerocho님. 이번 강의에서 [프론트엔드 세팅하기] 챕터 관련해서 질문드립니다. 강의 후반부에서 babel이 image, css 파일 등을 js파일로 변환한다고 하셨는데 그게 아니라 webpack의 loader(style-loader, file-loader) 가 js파일로 번들링 해주는거 아닌가요? 혹시 제가 모르는 부분이 있나해서 이렇게 문의드립니다. 혹시 참고할만한 문서가 있다면 같이 주시면 도움 될 것 같습니다:) 감사합니다.

  • babel
  • react
  • typescript
  • Socket.io
  • 웹팩
  • 클론코딩
댓글 1 좋아요 0 조회수 224

reaction 중첩 실행 문제

미해결

Redux vs MobX (둘 다 배우자!)

이렇게 사용하고있습니다. user_email이 변경되는 과정에서 console.log(value) 이게 onChange가 일어날 때마다 한 번씩만 실행되어야하는데 예를들어 'asdf'를 입력한다고 가정할 때 log에는 아래와 같이 찍힙니다. LOG => a LOG => as LOG => as LOG => asd LOG => asd LOG => asd LOG => asdf LOG => asdf LOG => asdf LOG => asdf 이렇게 점차 1개씩 스택이 쌓이듯 중첩되어 실행이되는데 제가 이상한건지 mobx가 이상한건지 감이 안 잡힙니다.. react-native 환경에서 사용하려합니다.

  • mobx
  • react
  • redux
  • mobx
  • reaction
몽키님 댓글 1 좋아요 1 조회수 271

라우트 파라미터와 useParams관련 질문드립니다.

미해결

Slack 클론 코딩[실시간 채팅 with React]

const { workspace } = useParams <{ workspace : string }>(); console . log ( 'workspace param name1 : ' , workspace ); workspace의 값이 계속 undefiend로 출력되고 있습니다. 현재 URL주소는 다음과 같습니다. http://localhost:3090/workspace/sleact/channel/일반 /App/index.tsx 파일에서도 /workspace/:workspace 로 해놓은 상황입니다. import React from 'react' ; import loadable from '@loadable/component' ; import { Switch , Route , Redirect } from 'react-router-dom' ; const LogIn = loadable (() => import ( '@pages/LogIn' )); // 코드 스플리팅 const SignUp = loadable (() => import ( '@pages/SignUp' )); const Workspace = loadable (() => import ( '@layouts/Workspace' )); const App = () => { return ( < Switch > < Redirect exact path = "/" to = "/login" /> < Route path = "/login" component = { LogIn } /> < Route path = "/signup" component = { SignUp } /> < Route path = "/workspace/:workspcae" component = { Workspace } /> </ Switch > ); }; export default App ; 의심가는 부분들은 어느정도 다 봤다고 생각하는데요. params가 undefined된 값을 출력하네요. import { Redirect } from 'react-router' ; import { Link , Switch , Route , useParams } from 'react-router-dom' ; 혹시 import가 문제가 있나 싶어서 useParams를 react-router와 react-router-dom 각각 불러왔는데도 마찬가지입니다.

  • react
  • route
  • Socket.io
  • typescript
  • useParams
  • react
  • 웹팩
  • babel
  • 클론코딩
부부 개발단 토토(김성박) 댓글 2 좋아요 0 조회수 1783

이번강좌에선 next 안쓰신 이유가 궁금합니다

미해결

Slack 클론 코딩[실시간 채팅 with React]

next의 장점중 하나가 코드스플리팅을 자동으로 해주는 거라고 알고있는데 react를 쓰신이유는 프로젝트 취지가 ssr 할 필요가 없어서 인가요?? 그리고 궁금한게 cna로 프로젝트 세팅을할때 ssr할 목적없이 코드스플리팅과 폴더구조를 잡아준다는 이유로 쓰기엔 비효율적인가요? next를 사용하면 꼭 ssr을 사용해야되는지 궁금합니다

  • next
  • Socket.io
  • react
  • typescript
  • react
  • 웹팩
  • babel
  • 클론코딩
87rlaehdus 댓글 1 좋아요 0 조회수 377

강의를 듣다가 궁금한 것이 있어 질문드립니다!

해결됨

따라하며 배우는 노드, 리액트 시리즈 - 기본 강의

사용하시는 vsc에 관련해서 질문드려요! 저도 지금 vsc를 사용하고 있는데 강의를 보다보면 자동완성 기능이 강사님이랑 저랑 다른 것 같아서요 저는 일부만 자동완성이 되는데 강사님은 여러가지를 자동완성으로 쉽게 쓰시더라고요! 혹시 js코드가 자동완성이 되는 extension이 있나요? 그리고 이건 단축키 질문인데 강의를 보면 {User}을 { User }로 바꿀 때 U자 앞과 r자 뒤로 가서 띄어쓰기를 안 하시고 단축키 눌러서 바로 바꾸시는 것 같아서요! 이건 어떤 단축키를 쓰신건가요?

  • vsc
  • 단축키
  • react
  • nodejs
댓글 1 좋아요 1 조회수 249

인기 태그

인프런 TOP Writers

주간 인기글