inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

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

[06:26 부분] 정규표현식으로 문자열 변환하기 부분 질문할게요

미해결

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

정규식으로 닉네임 찾는 부분에서요 match.match(/@\[(.+?)]\((\d+?)\)/)! 여기 이부분에서 느낌표(!)를 왜 붙여준건가요? str.match(정규표현식) 이런 형태로 작성하는 건줄 알았는데 느낌표가 붙여있어서 궁금해서 질문올립니다.

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

NotificationList.jsx 챕터 6장 실습 내용 질문 - 동시에 2개씩 나옴

해결됨

처음 만난 리액트(React)

요약: 3개가 각각 1-1-1 로 1초 간격으로 나와야 하지만, 2-1 로 나옴. 즉 2개가 한번에 나오고 나머지 1개가 나옴, notification 개수를 5개로 늘려봤더니, 1-1-1-1-1이 나와야 하지만 2-2-1로 나옵니다. 어디가 문제일까요.. 1. NotificationList import React from "react" ; import Notification from "./Notification" ; const reservedNotifications = [ { message : "안녕하세요, 오늘 일정을 알려드립니다." , }, { message : "오전은 피곤합니다" , }, { message : "점심식사 시간입니다." , }, { message : "30분 후 잠시 휴식하겠습니다." , }, { message : "퇴근합시다." , }, ]; var timer ; class NotificationList extends React . Component { constructor ( props ){ super ( props ); this . state = { notifications : [], }; } componentDidMount () { const { notifications } = this . state ; timer = setInterval ( () => { if ( notifications . length < reservedNotifications . length ){ const index = notifications . length ; notifications . push ( reservedNotifications [ index ]); this . setState ({ notifications : notifications }); } else { clearInterval ( timer ); } }, 5000 ); } render () { return ( < div > { this . state . notifications . map (( notification ) => { return < Notification message = { notification . message } /> ; }) } </ div > ); } } export default NotificationList ; 2. Notification import React from "react" ; const styles = { wrapper : { margin : 8 , padding : 8 , display : "flex" , flexDirection : "row" , border : "1px solid grey" , borderRadius : 16 }, messageText : { color : "black" , fontSize : 16 } }; class Notification extends React . Component { constructor ( props ) { super ( props ); this . state = {}; } render () { return ( < div style = { styles . wrapper } > < span style = { styles . messageText } > { this . props . message } </ span > </ div > ) } } export default Notification ; 도와주세요!

  • javascript
  • HTML/CSS
  • react
권예준 댓글 1 좋아요 7 조회수 1202

tsconfig관련 질문 있습니다

미해결

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

슬리액트 강의 내용 일렉트론으로 작업해 보려고 따라하는 중에 tsconfig path 설정에서 오류가 생겼습니다. import 경로 위에 컨트롤 + 마우스클릭 할 경우 정상적으로 해당 파일로 이동합니다. 근데 막상 서버 실행 시에는 아래와 같은 오류가 나더라구요. 참고로 저는 CRA를 사용했습니다!! 스택오버플로우 아래 해결책도 해보았는데 해결이 안되어서 질문드립니다ㅠㅠ 제 tsconifg.json 입니다~!! 방향 잡아주시면 또 열심히 찾아보겠습니다 감사합니다!! ㅠㅠ { "compilerOptions": { "target": "es5", "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, "strict": true, "forceConsistentCasingInFileNames": true, "noFallthroughCasesInSwitch": true, "module": "esnext", "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, "jsx": "react-jsx", "baseUrl": "./src", "paths": { "@hooks/*": ["src/hooks/*"], "@components/*": ["src/components/*"], "@pages/*": ["src/pages/*"], "@utils/*": ["src/utils/*"], "@types/*": ["src/types/*"] }, "plugins": [{ "transform": "typescript-transform-paths" }] }, "include": ["src"] }

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

npm install이 안됩니다

미해결

따라하며 배우는 노드, 리액트 시리즈 - 쇼핑몰 사이트 만들기[전체 리뉴얼]

ilerplate-mern-stack-master\boilerplate-mern-stack-master> npm install npm WARN old lockfile npm WARN old lockfile The package-lock.json file was created with an old version of npm, npm WARN old lockfile so supplemental metadata must be fetched from the registry. npm WARN old lockfile npm WARN old lockfile This is a one-time fix-up, please be patient... npm WARN old lockfile npm WARN deprecated ini@1.3.5: Please update to ini >=1.3.6 to avoid a prototype pollution issue npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated mkdirp@0.5.4: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.) npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated source-map-url@0.4.0: See https://github.com/lydell/source-map-url#deprecated npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) npm WARN deprecated debug@3.2.6: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) npm WARN deprecated debug@3.2.6: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) npm WARN deprecated bcrypt@3.0.8: versions < v5.0.0 do not handle NUL in passwords properly npm WARN deprecated node-pre-gyp@0.14.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future npm ERR! code 1 npm ERR! path C:\Users\SAMSUNG\OneDrive\바탕 화면\PersonalProjects\WebProjects\boilerplate-mern-stack-master\boilerplate-mern-stack-master\node_modules\bcrypt npm ERR! command failed npm ERR! command C:\Windows\system32\cmd.exe /d /s /c C:\Users\SAMSUNG\AppData\Local\Temp\install-ca11b823.cmd npm ERR! Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\SAMSUNG\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\SAMSUNG\OneDrive\바탕 화면\PersonalProjects\WebProjects\boilerplate-mern-stack-master\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\SAMSUNG\OneDrive\바탕 화면\PersonalProjects\WebProjects\boilerplate-mern-stack-master\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v102' (1) npm ERR! node-pre-gyp info it worked if it ends with ok npm ERR! node-pre-gyp info using node-pre-gyp@0.14.0 npm ERR! node-pre-gyp info using node@17.4.0 | win32 | x64 npm ERR! node-pre-gyp WARN Using needle for node-pre-gyp https download npm ERR! node-pre-gyp info check checked for "C:\Users\SAMSUNG\OneDrive\바탕 화면\PersonalProjects\WebProjects\boilerplate-mern-stack-master\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding\bcrypt_lib.node" (not found) npm ERR! node-pre-gyp http GET https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.8/bcrypt_lib-v3.0.8-node-v102-win32-x64-unknown.tar.gz npm ERR! node-pre-gyp http 404 https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.8/bcrypt_lib-v3.0.8-node-v102-win32-x64-unknown.tar.gz npm ERR! 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-v102-win32-x64-unknown.tar.gz npm ERR! node-pre-gyp WARN Pre-built binaries not found for bcrypt@3.0.8 and node@17.4.0 (node-v102 ABI, unknown) (falling back to source compile with node-gyp) npm ERR! node-pre-gyp http 404 status code downloading tarball https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.8/bcrypt_lib-v3.0.8-node-v102-win32-x64-unknown.tar.gz npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.0.0 npm ERR! gyp info using node@17.4.0 | win32 | x64 npm ERR! gyp info ok npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.0.0 npm ERR! gyp info using node@17.4.0 | win32 | x64 npm ERR! gyp info find Python using Python version 3.10.2 found at "C:\Users\SAMSUNG\AppData\Local\Programs\Python\Python310\python.exe" npm ERR! gyp ERR! find VS npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt npm ERR! gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details npm ERR! gyp ERR! find VS looking for Visual Studio 2015 npm ERR! gyp ERR! find VS - not found npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8 npm ERR! gyp ERR! find VS npm ERR! gyp ERR! find VS ************************************************************** npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload. npm ERR! gyp ERR! find VS For more information consult the documentation at: npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows npm ERR! gyp ERR! find VS ************************************************************** npm ERR! gyp ERR! find VS npm ERR! gyp ERR! configure error npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use npm ERR! gyp ERR! stack at VisualStudioFinder.fail (C:\Users\SAMSUNG\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:122:47) npm ERR! gyp ERR! stack at C:\Users\SAMSUNG\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:75:16 npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Users\SAMSUNG\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:363:14) npm ERR! gyp ERR! stack at C:\Users\SAMSUNG\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:71:14 npm ERR! gyp ERR! stack at C:\Users\SAMSUNG\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:384:16 npm ERR! gyp ERR! stack at C:\Users\SAMSUNG\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7 npm ERR! gyp ERR! stack at C:\Users\SAMSUNG\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16 npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:406:5) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:520:28) npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1090:16) npm ERR! gyp ERR! System Windows_NT 10.0.19044 npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\SAMSUNG\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\SAMSUNG\\OneDrive\\바탕 화면\\PersonalProjects\\WebProjects\\boilerplate-mern-stack-master\\boilerplate-mern-stack-master\\node_modules\\bcrypt\\lib\\binding\\bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=C:\\Users\\SAMSUNG\\OneDrive\\바탕 화면\\PersonalProjects\\WebProjects\\boilerplate-mern-stack-master\\boilerplate-mern-stack-master\\node_modules\\bcrypt\\lib\\binding" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v102" npm ERR! gyp ERR! cwd C:\Users\SAMSUNG\OneDrive\바탕 화면\PersonalProjects\WebProjects\boilerplate-mern-stack-master\boilerplate-mern-stack-master\node_modules\bcrypt npm ERR! gyp ERR! node -v v17.4.0 npm ERR! gyp ERR! node-gyp -v v9.0.0 npm ERR! gyp ERR! not ok npm ERR! node-pre-gyp ERR! build error npm ERR! node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\SAMSUNG\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\SAMSUNG\OneDrive\바탕 화면\PersonalProjects\WebProjects\boilerplate-mern-stack-master\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\SAMSUNG\OneDrive\바탕 화면\PersonalProjects\WebProjects\boilerplate-mern-stack-master\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v102' (1) npm ERR! node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\SAMSUNG\OneDrive\바탕 화면\PersonalProjects\WebProjects\boilerplate-mern-stack-master\boilerplate-mern-stack-master\node_modules\node-pre-gyp\lib\util\compile.js:83:29) npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:520:28) npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1090:16) npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) npm ERR! node-pre-gyp ERR! System Windows_NT 10.0.19044 npm ERR! node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\SAMSUNG\\OneDrive\\바탕 화면\\PersonalProjects\\WebProjects\\boilerplate-mern-stack-master\\boilerplate-mern-stack-master\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" npm ERR! node-pre-gyp ERR! cwd C:\Users\SAMSUNG\OneDrive\바탕 화면\PersonalProjects\WebProjects\boilerplate-mern-stack-master\boilerplate-mern-stack-master\node_modules\bcrypt npm ERR! node-pre-gyp ERR! node -v v17.4.0 npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.14.0 npm ERR! node-pre-gyp ERR! not ok npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\SAMSUNG\AppData\Local\npm-cache\_logs\2022-08-08T08_26_57_475Z-debug-0.log vscode는 최신버전을 사용중이고 node -v v17.4.0 npm -v 8.16.0 를 사용하고 있습니다.

  • mongodb
  • nodejs
  • 웹앱
  • redux
  • react
댓글 1 좋아요 0 조회수 335

한글 파일명 인코딩 문제

미해결

MERN STACK 커뮤니티 : 시작부터 배포까지 알려주는 React

안녕하세요 강사님~ :) 강의를 이해하기 쉽게 잘 설명해 주셔서 즐겁게 수강 중에 있습니다. 다름이 아니라, 서버쪽에서 console.log(res.req.file);을 찍어보면 아래 사진에서처럼 한글 파일명이 깨져서 나타납니다. 혹시 한글로 인코딩 하려면 어떻게 해야 하는지 알 수 있을까요? (T^T 구글링을 해도 못 찾겠어서 여쭤보아요)

  • react
  • express
  • 인코딩
  • utf-8
  • react
  • nodejs
  • mongodb
  • firebase
김지연 댓글 1 좋아요 1 조회수 358

404에러 예외처리 하는 도중 에러가납니다

미해결

파이썬/장고 웹서비스 개발 완벽 가이드 with 리액트

Exception in thread django-main-thread: Traceback (most recent call last): File "C:\Users\lee\.conda\envs\askcompany\lib\threading.py", line 973, in _bootstrap_inner self.run() File "C:\Users\lee\.conda\envs\askcompany\lib\threading.py", line 910, in run self._target(*self._args, **self._kwargs) File "C:\Users\lee\.conda\envs\askcompany\lib\site-packages\django\utils\autoreload.py", line 53, in wrapper fn(*args, **kwargs) File "C:\Users\lee\.conda\envs\askcompany\lib\site-packages\django\core\management\commands\runserver.py", line 117, in inner_run self.check(display_num_errors=True) File "C:\Users\lee\.conda\envs\askcompany\lib\site-packages\django\core\management\base.py", line 392, in check all_issues = self._run_checks( File "C:\Users\lee\.conda\envs\askcompany\lib\site-packages\django\core\management\base.py", line 382, in _run_checks return checks.run_checks(**kwargs) File "C:\Users\lee\.conda\envs\askcompany\lib\site-packages\django\core\checks\registry.py", line 72, in run_checks new_errors = check(app_configs=app_configs) File "C:\Users\lee\.conda\envs\askcompany\lib\site-packages\django\core\checks\urls.py", line 13, in check_url_config return check_resolver(resolver) File "C:\Users\lee\.conda\envs\askcompany\lib\site-packages\django\core\checks\urls.py", line 23, in check_resolver return check_method() File "C:\Users\lee\.conda\envs\askcompany\lib\site-packages\django\urls\resolvers.py", line 407, in check for pattern in self.url_patterns: File "C:\Users\lee\.conda\envs\askcompany\lib\site-packages\django\utils\functional.py", line 48, in __get__ res = instance.__dict__[self.name] = self.func(instance) File "C:\Users\lee\.conda\envs\askcompany\lib\site-packages\django\urls\resolvers.py", line 588, in url_patterns patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File "C:\Users\lee\.conda\envs\askcompany\lib\site-packages\django\utils\functional.py", line 48, in __get__ res = instance.__dict__[self.name] = self.func(instance) File "C:\Users\lee\.conda\envs\askcompany\lib\site-packages\django\urls\resolvers.py", line 581, in urlconf_module return import_module(self.urlconf_name) File "C:\Users\lee\.conda\envs\askcompany\lib\importlib\__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1030, in _gcd_import File "<frozen importlib._bootstrap>", line 1007, in _find_and_load File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 680, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 850, in exec_module File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed File "C:\Dev\askcompany\askcompany\urls.py", line 41, in <module> path('__debug__/', include('debug_toolbar.urls')), File "C:\Users\lee\.conda\envs\askcompany\lib\site-packages\django\urls\conf.py", line 34, in include urlconf_module = import_module(urlconf_module) File "C:\Users\lee\.conda\envs\askcompany\lib\importlib\__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1030, in _gcd_import File "<frozen importlib._bootstrap>", line 1007, in _find_and_load File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 680, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 850, in exec_module File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed File "C:\Users\lee\.conda\envs\askcompany\lib\site-packages\debug_toolbar\urls.py", line 5, in <module> urlpatterns = DebugToolbar.get_urls() File "C:\Users\lee\.conda\envs\askcompany\lib\site-packages\debug_toolbar\toolbar.py", line 145, in get_urls for panel_class in cls.get_panel_classes(): File "C:\Users\lee\.conda\envs\askcompany\lib\site-packages\debug_toolbar\toolbar.py", line 126, in get_panel_classes panel_classes = [ File "C:\Users\lee\.conda\envs\askcompany\lib\site-packages\debug_toolbar\toolbar.py", line 127, in <listcomp> import_string(panel_path) for panel_path in dt_settings.get_panels() File "C:\Users\lee\.conda\envs\askcompany\lib\site-packages\django\utils\module_loading.py", line 17, in import_string module = import_module(module_path) File "C:\Users\lee\.conda\envs\askcompany\lib\importlib\__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1030, in _gcd_import File "<frozen importlib._bootstrap>", line 1007, in _find_and_load File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 680, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 850, in exec_module File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed File "C:\Users\lee\.conda\envs\askcompany\lib\site-packages\debug_toolbar\panels\settings.py", line 7, in <module> get_safe_settings = get_default_exception_reporter_filter().get_safe_settings AttributeError: 'SafeExceptionReporterFilter' object has no attribute 'get_safe_settings' 구글에 검색해봤는데 정확히 무슨 내용인지 모르겠네요...

  • django
  • react
  • docker
  • python
똘이77 댓글 3 좋아요 0 조회수 607

project 폴더 설정 관련 질문

해결됨

파이썬/장고 웹서비스 개발 완벽 가이드 with 리액트

안녕하세요, askcompany 프로젝트 폴더 설정하는 부분에서 몇가지 질문이 있습니다. 1. DEBUG 모드일때만 프로젝트 폴더의 urls.py에 media 관련 url을 추가해주는 이유가 있을까요? 해당 url은 어떤 역할을 하게 되는 것인가요? 2. 프로젝트 폴더의 urls.py에서 사용한 from django.conf import settings과 django github의 django.conf.global_settings.py의 차이가 궁금합니다. 3. 2번의 settings와 프로젝트 폴더에 자동으로 생성된 settings.py의 차이가 궁금합니다. 4. settings를 개발과 운영으로 나눴는데 그렇다면 settings/prod.py에 DEBUG=False와 같은 설정을 바꿔야 하는게 아닌지 궁금합니다. 감사합니다.

  • docker
  • react
  • django
  • python
zxpjh0323 댓글 1 좋아요 0 조회수 236

강의보고 아무리 따라쳐도 안될것임.

미해결

처음 만난 리액트(React)

/**/ import React from "react"; const styles = { wrapper: { margin : 9, padding : 9, display : "flex", flexDirection: "row", border: "1px solid grey", borderRadius : 15 }, messageText: { color: "black" ,fontSize : 15 }, }; class Notification extends React.Component{ constructor(props){ super(props); this.setState = {}; } render(){ return( <div style={styles.wrapper}> <span style={styles.messageText}>{this.props.message}</span> </div> ); } } export default Notification; /**/ import React from "react"; import Notification from "./Notification" const reservedNotifications = [ { message : "안녕하세요, 오늘 일정을 알려드립니다.", }, { message : "안녕하세요, 오늘 점심을 알려드립니다.", }, { message : "안녕하세요, 오늘 저녁을 알려드립니다.", }, ]; var timer ; class NotificationList extends React.Component{ constructor(props){ super(props) this.state = { notificationarr : [{ message : "안녕하세요 ." }] , } } componentDidMount(){ const { notificationarr } = this.state; timer = setInterval(() => { if(notificationarr && notificationarr.length < reservedNotifications.length){ const index = notificationarr.length; console.log(index); notificationarr.push(reservedNotifications[index]); this.setState({ notification: notificationarr, }); }else{ clearInterval(timer); return; } }, 1000); } render() { return( <div> { this.state.notificationarr.map((notification) => { return<Notification message={notification.message} /> })} </div> ); } } export default NotificationList

  • react
  • HTML/CSS
  • javascript
S J 댓글 3 좋아요 0 조회수 1203

mousedown과 touchstart에 대한 질문입니다

미해결

따라하며 배우는 리액트 A-Z[19버전 반영]

안녕하세요 좋은 강의 잘 듣고있습니다. 감사합니다. useOnClickOutside 함수에서 document.addEventListener("mousedown", listener); document.addEventListener("touchstart", listener); 를 이용해서 모달 창 외부를 클릭했는지 감지하는 것으로 이해했습니다. 그래서 저는 mousedown과 touchstart 대신에 document.addEventListener("click", listener) 을 써도 되지 않을까 싶어서 해봤는데 이렇게 하니까 모달창이 아예 나타나지 않더라구요. 'touchstart' 이벤트 리스너는 없어도 동일하게 동작하는 것 같은데 'click' 'mousedown' 이벤트는 어떤 차이가 있는 것인지 궁금합니다. 감사합니다.

  • typescript
  • redux
  • tdd
  • react
  • Next.js
댓글 2 좋아요 0 조회수 839

styled-components를 적용하려면

미해결

처음 만난 리액트(React)

styled-components를 적용하려면 꼭 스타일을 위한 component를 만든다음에 그걸로 감싸야하나요? 그렇게 사용하다보면 리액트 콤포넌트와 스타일 콤포넌트가 섞여서 헷갈리지 않을까요?

  • HTML/CSS
  • javascript
  • react
정상구 정 댓글 5 좋아요 0 조회수 682

[id].tsx 에서 params 빨간줄 부분 괜찮나요?

미해결

따라하며 배우는 리액트 A-Z[19버전 반영]

여기서 41번째줄 params 빨간줄 지나가도 괜찮나요 실행은 잘되는데 이유가 궁금합니다 undefine이라고 하는데... 잘모르겠네요

  • Next.js
  • tdd
  • react
  • redux
  • typescript
오일중 댓글 1 좋아요 0 조회수 459

useRef를 선호하시는 이유가 궁금합니다!

해결됨

풀스택 리액트 토이프로젝트 - REST, GraphQL (for FE개발자)

지금까지 input 관리를 컴포넌트로 빼서 useCallback과 useState, onChange 메서드를 사용하여 써왔는데 useRef로 관리할 수 있다는 걸 보고 깜짝 놀랐습니다. 개인적인 선호라고 하셨지만 특별히 이유가 있을까 하여 useRef에 대해 찾아보니 useRef는 input value의 상태가 바뀌어도 리렌더링이 안 되는 이점이 있더라구요. 그렇다면 input이 많은 회원가입 같은 form을 만들 때 useRef를 사용한다면 굳이 useCallback이나 useMemo를 쓰거나 여러 개의 useState 를 만들지 않아도 될 것 같다는 생각에 이르더라구요 이러한 이점 때문에 useRef를 쓰시는 것인지 궁금합니다

  • react
  • graphql
  • rest-api
댓글 1 좋아요 1 조회수 808

혹시 계획하고 있으신 후속강의가 있을까요?

미해결

파이썬/장고 웹서비스 개발 완벽 가이드 with 리액트

안녕하세요 강사님? 정말 오랜만에 질문 드립니다 ㅎㅎ 0. 우선 하나 여쭙고 싶은 게, 혹시 멘토링을 진행하시나요? -괜찮으시다면 강의외적으로 몇가지 질문을 드리고 싶어서, 혹시 인프런에서 진행되는 멘토링 처럼, 따로 어디선가 멘토링을 진행하고 계시다면 신청하고 싶어서 여쭤봅니다 ㅎㅎ 1. 혹시 후속강의가 있을까요? 해당 강의에서의 DRF의 기능들은 대체로 기본적인 몇가지 기능들에 대해서 소개해주시는 느낌이 강해서, 백엔드/DRF쪽으로 심화된 강의를 준비하시는 게 있을지 궁금합니다. 2. DRF나 장고관련해서, 강의에는 나오지 않았지만 현업에서 필요한 몇가지 학습 키워드나 책을 추천해주실 수 있으실까요? 마지막으로 감사합니다~ 선생님 강의 덕분에 부트캠프기간이나 끝나고 나서도 장고라는 프레임워크에는 늘 자신이 있더라구요. 감사인사를 꼭한번 드리고 싶었습니다! 감사합니다~

  • 후속강의
  • docker
  • python
  • react
  • django
김영빈 댓글 1 좋아요 0 조회수 236

banner가 여러 번 실행됩니다

미해결

따라하며 배우는 리액트 A-Z[19버전 반영]

https://github.com/kkyu0718/react-study/tree/main/react-netflix-clone 코드는 위에 있습니다. 일단은 app.js 가 한번 렌더링되면서 banner도 한번 렌더링 되어야하는데 이렇게 8번이 실행됩니다. 1번 때문에 실행이 안되고 있는 걸수도 있는데 useEffect() 에서의 fetchData가 실행이 되고 있지않아 Uncaught TypeError: Cannot read properties of undefined (reading 'results') 가 발생하는거 같습니다. 코드를 다시 아무리봐도 문제는 없어보이는데 혹시 어떻게 해결해야될까요?

  • tdd
  • typescript
  • react
  • redux
  • Next.js
댓글 1 좋아요 0 조회수 319

Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0 에러가 발생했습니다.

미해결

현재 웹개발중인 초급 개발자입니다. 현재 개발이 마무리 단계에서 웹서버랑 통신?!이 안되는 듯합니다. 로컬서버에서는 오류없이 실행이 되는데 웹서버에서는 현재 실행이 안되고 있습니다. Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0 라고 콘솔창에 이렇게 오류가 표시됩니다. 원인을 모르겠습니다. 어디를 수정해야하는지... 현재 apache2로 웹서버를 연동하고 있습니다.

  • react
  • aws
  • lightsail
  • node
  • apache2
  • express
  • javascript
  • typescript
투진컴퍼니 댓글 0 좋아요 0 조회수 462

react-query 4.0.0 버전에선 에러가 납니다

해결됨

풀스택 리액트 토이프로젝트 - REST, GraphQL (for FE개발자)

1:00 에서 return null 을 한 뒤 돌려보니 위와 같은 에러가 떠서 확인해보니, react-query: 4.0.0 과는 호환이 안 되는 것을 확인했습니다. 강사님 깃허브에서 버전 확인 후 react-query를 " ^3.17.2 " 으로 낮춘 뒤 돌려보니 잘 뜹니다... 4.0.0 을 사용하려면 ` yarn add @tanstack/react-query `를 따로 설치 후, ` import { QueryClient, QueryClientProvider } from "@tanstack/react-query";` 이렇게 바꿔사용하라는데 이렇게 하면 맞을까요?

  • graphql
  • react
  • rest-api
댓글 1 좋아요 0 조회수 677

안녕하세요 선생님~~

미해결

따라하며 배우는 리액트 A-Z[19버전 반영]

useEffect(() => { first return () => { second } }, [third]) useEffect를 사용할때 first는 처음 렌더링이 된후에 실행 second는 앱이 종료될때 실행되고 third는 어떠한 state가 변경될때 useEffect를 다시 실행할것인가? 로 이해를 했습니다 여기서 질문이 있는데 nav.js에서는 처음 렌더링후 우리가 스크롤을 하였을때 추가적인 렌더링이 필요하기에 useEffect로 이벤트를 만들었다 라고 이해를 하였는데 Banner.js에서는 백그라운드이미지 경로에 movie.backdrop_path를 넣는데 렌더링 되기전에 useEffect가 먼저 실행이 된것인가요? 먼저 실행이 안되면 movie안에는 아무것도 없지 않나요? 실력이 없어 질문이 일목요연하지 못한점 죄송합니다 추가로 console.log()로 찍어보니 렌더가 되고 useEffect()가 실행이 되어서 setmovie로 스테이트를 set해주고 그래서 스테이트가 바뀌니 다시 렌더가 되고 근데 문제는 처음에 렌더가 될때 movie가 비었기 때문에 에러가 떠야하는데 순서가 위와 같이 나옵니다 렌더 에러 이펙트 렌더가 맞지 않나요?

  • react
  • typescript
  • redux
  • tdd
  • Next.js
성민석 댓글 3 좋아요 2 조회수 506

인기 태그

인프런 TOP Writers

주간 인기글