묻고 답해요
161만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결한 입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지
중첩 Context
강사님 왜 중첩 Context를 사용하는지 이해가 되지 않아 https://www.inflearn.com/questions/800739/context%EC%97%90-%EA%B4%80%ED%95%B4%EC%84%9C-%EC%A7%88%EB%AC%B8%EB%93%9C%EB%A6%BD%EB%8B%88%EB%8B%A4질문에 답변하신 것을 보았습니다제가 이해한 바로는 상위 컴포넌트의 state가 변경되면 Context는 리렌더링 되고 리렌더링 되면서 하위 Context로 전달하려는 객체가 재생성되기 때문에 기존과 다른 prop이 왔다고 인식하여 React.memo를 활용하여 리렌더링을 방지하려 했던 것이 의미 없게 된다 따라서 객체에 useMemo를 활용하여 state가 변경되었을 때 재생성되지 않도록 방지하는 것으로 이해하였습니다. 제가 이해한게 맞나요? 그렇다면 중첩 Context가 아닌 useMemo를 활용하면 해결되는 문제 아닌가요? useMemo를 활용하여 state가 변경되어 컴포넌트가 리렌더링될때 재생성되는거만 방지해줄 수 있지 않나요?
-
미해결한 입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지
React Hook useMemo has a missing dependency
강사님 강사님의 강의를 들으며 진행하고 있는데 아래와 같은 경고 메시지가 계속 나와 경고 메시지를 받지 않으려면 어떻게 코드를 작성해야 하는지 궁금해서 질문 드립니다!아래는 제가 작성한 코드입니다https://codesandbox.io/s/youthful-glitter-6thymf?file=/src/App.js:0-2523Line 54:8: React Hook useMemo has a missing dependency: 'data'. Either include it or remove the dependency array react-hooks/exhaustive-deps Line 58:51: React Hook useMemo has missing dependencies: 'addDiary', 'deleteDiary', and 'editDiary'. Either include them or remove the dependency array react-hooks/exhaustive-deps
-
해결됨Only Javascript만으로 배우는 하이브리드앱 패키징
코르도바와 다른 프로젝트 연동 질문입니다.
안녕하세요.공부하다가 궁금한점이 있어서 질문을 드릴려고 합니다.제가 기존의 jsp + spring + tomcat으로 웹을 배포하여 서버를 굴리고 있는데 코르도바에서 inappbrowser로 배포된 서버의 특정 URL로 열고 코르도바에서 모바일의 네이티브 기능을 사용할 수 있는것인지 궁금합니다.예를 들면 기존 웹프로젝트(코르도바로 생성된 프로젝트가 아닌)에서 코르도바 inappbrowser로 열고 푸시 알림같은것을 사용할 수 있는지 궁급합니다.
-
미해결처음 만난 리액트(React)
미니 블로그 질문입니다.
미니블로그를 실행시키면 아래와 같은 에러가 브라우저 콘솔에 찍힙니다.소스는 몇 번을 확인해서 잘 못 된 부분이 없다고 생각합니다.MainPage.jsx 부터 불러오질 못하네요.뭐가 잘 못 됐는지 찾아주시면 고맙겠습니다.아래는 App.js 에 PostWritePage, PostViewPage 를 빼고 실행했을 경우 브라우저 페이지 자체에 나오는 에러입니다. function App(props) { return ( <BrowserRouter> <MainTitleText>제플리카의 미니 블로그</MainTitleText> <Routes> <Route index element={<MainPage />} /> </Routes> </BrowserRouter> ); } Uncaught runtime errors:×ERRORElement type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports. Check the render method of MainPage. Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports. Check the render method of MainPage. at createFiberFromTypeAndProps (http://localhost:3000/static/js/bundle.js:36883:21) at createFiberFromElement (http://localhost:3000/static/js/bundle.js:36904:19) at createChild (http://localhost:3000/static/js/bundle.js:25473:32) at reconcileChildrenArray (http://localhost:3000/static/js/bundle.js:25713:29) at reconcileChildFibers (http://localhost:3000/static/js/bundle.js:26055:20) at reconcileChildren (http://localhost:3000/static/js/bundle.js:28987:32) at updateHostComponent (http://localhost:3000/static/js/bundle.js:29631:7) at beginWork (http://localhost:3000/static/js/bundle.js:31076:18) at HTMLUnknownElement.callCallback (http://localhost:3000/static/js/bundle.js:16062:18) at Object.invokeGuardedCallbackDev (http://localhost:3000/static/js/bundle.js:16106:20)ERRORElement type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports. Check the render method of MainPage. Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports. Check the render method of MainPage. at createFiberFromTypeAndProps (http://localhost:3000/static/js/bundle.js:36883:21) at createFiberFromElement (http://localhost:3000/static/js/bundle.js:36904:19) at createChild (http://localhost:3000/static/js/bundle.js:25473:32) at reconcileChildrenArray (http://localhost:3000/static/js/bundle.js:25713:29) at reconcileChildFibers (http://localhost:3000/static/js/bundle.js:26055:20) at reconcileChildren (http://localhost:3000/static/js/bundle.js:28987:32) at updateHostComponent (http://localhost:3000/static/js/bundle.js:29631:7) at beginWork (http://localhost:3000/static/js/bundle.js:31076:18) at HTMLUnknownElement.callCallback (http://localhost:3000/static/js/bundle.js:16062:18) at Object.invokeGuardedCallbackDev (http://localhost:3000/static/js/bundle.js:16106:20)ERRORElement type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports. Check the render method of MainPage. Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports. Check the render method of MainPage. at createFiberFromTypeAndProps (http://localhost:3000/static/js/bundle.js:36883:21) at createFiberFromElement (http://localhost:3000/static/js/bundle.js:36904:19) at createChild (http://localhost:3000/static/js/bundle.js:25473:32) at reconcileChildrenArray (http://localhost:3000/static/js/bundle.js:25713:29) at reconcileChildFibers (http://localhost:3000/static/js/bundle.js:26055:20) at reconcileChildren (http://localhost:3000/static/js/bundle.js:28987:32) at updateHostComponent (http://localhost:3000/static/js/bundle.js:29631:7) at beginWork (http://localhost:3000/static/js/bundle.js:31076:18) at beginWork$1 (http://localhost:3000/static/js/bundle.js:36015:18) at performUnitOfWork (http://localhost:3000/static/js/bundle.js:35284:16)
-
미해결Vue.js 완벽 가이드 - 실습과 리팩토링으로 배우는 실전 개념
CreateListView.js 파일에서 $store 가 불러와지나요???
main.js에도 잘 연결되어있는데해당 에러가 납니다이유가 무엇인지 잘 모르겠네요
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스
has,is 통일성
트루,펄스를 논하는 불리안 형태의 변수인 has,is을 한 api안에 has,is을 번갈아 써도 괜찮을까요?is으로만 써야 되거나 has로만 써야 되거나 그런 규칙은 없나요?
-
미해결처음 배우는 리액트 네이티브
안드로이드에서 expo실행이 안되요
프로젝트 생성하고 expo start로 나온 qr코드를 expo go에서는 Uncaught Error : java.lang.Exception: Failed to load all assets 뜨면서 오류화면만 출력하는데 어떻게 해결하나요??
-
해결됨처음 배우는 리액트 네이티브
터미널 다운 및 사용방법
안녕하세요 처음 프로젝트를 만들고 싶어 강의를 수강하게 된 학생입니다. 혹시 강의 초반에 JDK같은 여러 설치 파일들을 AltchemistK라는 터미널로 설치하시던데 이 터미널을 어디서 다운받아 사용하는지 몰라서 질문드립니다.
-
미해결비전공자를 위한 진짜 입문 올인원 개발 부트캠프
node server.js 실행 시 오류 발생
Express에서 데이터 처리하기 강의 수강 중에 생긴 오류 입니다. 이후에 포스트맨에서 body 수정 후 send 시에도 Error: connect ECONNREFUSED이 오류가 떳습니다.index.js를 실행 후에 웹 브라우저에 http://localhost:8080/products 입력하면 [{"name":"농구공","price":5000}] 이렇게 웹 화면에 뜨면서 node:events:492 thorw er;도 같이 뜨면서 서버 에러가 납니다 database.sqlite3을 vs코드 열었을 때는 위 사진처럼 뜨고sqllite로 열었을 때는 읽을 수 없다고 뜹니다
-
미해결한 입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지
useState() 데이터 추가 성능 질문
안녕하세요! React에서 useState()를 사용하여 배열과 같은 데이터 구조에서 자료를 추가하는 경우,다른 언어같은 경우 원소 하나만 추가하는 시간복잡도가 O(1)으로 수행하는 함수가 있는데(C++의 append 혹은 push) React에서는 항상 [newItem,...data] 이런 식으로 원소 하나 추가할 때마다, 배열의 값을 모두 새로 만드는데, 데이터가 많아질 경우 시간복잡도가 O(n)으로 비효율적일 것 같습니다. 그래서 React에는 push()같은 방식으로 데이터를 추가하는 방법이 있나요? 없다면 없는 이유가 무엇인가요??
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스
비지니스 로직 과 서비스
비지니스 로직 과 서비스가 같은 말인가요?
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스
vscode 복사 단축키
파일 여러개 선택해서 다른 폴더에 복사 붙여넣기하는 단축키가 궁금합니다
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스
한국어 글자
안녕하세요. 변수명에 한국 글자로 데이터를 저장하고 브라우저에서 보여 주려면 이상하게 보이고 있어여. 어떻게 하면 보여요?
-
미해결처음 만난 리액트(React)
이게 왜 안될까요? 변수가 안먹어요
import React from "react"; function Book(props) { return ( <div> <h1>{'이 책의 이름은 ${props.name}입니다'}</h1> <h2>{'이 책은 총 ${props.numOfPage} 페이지로 이뤄져 있습니다.'}</h2> </div> ); } export default Book;
-
해결됨떠먹는 Three.js
소스코드 공유는 없을까요?
강의 대부분이 내용 skip이 되며, 이번 강의에서는 css파일 등이 공개가 되어 있지 않아똑같이 따라하기가 너무나 힘듭니다. ㅠㅠ 기술을 배워 응요하는 것도 좋지만, 처음 학습시에는 시청한 강의와 똑같은 내용으로 만들어보고자 합니다. 해당 소스코드 (모델들, 세팅 index.js 소스코드, reset css)가 어딘가 공유가 되어있는지, 또는 공유가 가능한지 알고 싶습니다.강의 내용 중 사용된 material 등도 제공 가능하신지 알고 싶습니다.
-
해결됨프로젝트 만들기
소스코드 부탁드릴꼐요!
yunajoe@gmail.com으로 보내주시면은 감사하겠습니다 :)
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스
04-02 docker-api 패키징 실습 중 에러
04-02 docker에서 포트 내보내는 실습 도중 갑자기 사진과 같이 에러가 나는데 서버 띄우는데는 지장이 없이 잘 돌아갑니다. 지금까지 잘 돌아가다가 확인해보니 모든 파일의 import 코드 부분이 다 저렇게 에러가 나는데 어떻게 해야 하나요 ? 서치해도 마땅히 나오지 않아 질문 드립니다 ㅜㅜ
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스
상품 알러지 정보에 아무것도 없는 경우
상품 알러지에 아무 것도 없는 경우에는 어떻게 구조를 잡아야할까요?'만다린 버베나 피지오'의 경우에는 알러지 정보가 없어서 이런 식으로 정규화를 진행했는데, 다른 방법이 있는지 궁금합니다!
-
미해결처음 배우는 리액트 네이티브
expo init 에러
expo init mfp 를 실행했는데이런 에러가 나오네요 어떻게 해결해야할까요
-
미해결처음 만난 리액트(React)
실습 강의 미니프로젝트 const {} = props ;
function MainPage(props) {const {} = props ;props 에다 중괄호에 아무것도 없이 쓰는 건 객체를 선언하기 위함인가요? 무슨 기능을 하는지 모르겠어요 이 코딩 한 줄 쓰는 이유가 뭔가요?