"상품 업로드 기능 구현-2" 강의 중 잘 따라가다가 후반부에서 경로 문제로 인해 문의드립니다. 업로드 페이지에서 업로드는 잘 되나, 업로드 후 메인 페이지에서 등록된 이미지가 나오지 않아 확인해보니 "/" 대신에 콘솔에는 캡처1과 같이 "\\" 가 나오고 DB Browser에서는 캡처2와 같이 "\"가 나옵니다. : 캡처1 입니다. : 캡처2 입니다. 원인을 찾아보니 windows에서 파일 경로를 다룰 때 "\\"로 하기 때문에 생기는 문제라고 하는데요... 어떻게 해결하면 좋을지 모르겠습니다. 해결방법을 알려주시면 감사하겠습니다.
선생님 수업 따라서 열심히 따라 왔는데 여기서 막히네요.해결 좀 부탁드립니다.제가 나이가 53인데 사다리차 운전 하면서 자영업 하는데 다른길좀 가보려고 공부하는 중이거든요. 다른 분들한테는 쉬운걸 텐데 저한테는 어렵네요.구글링 해보고 네이버 도 찾아봣는데 찾을수가 없네요.이걸 해결해야 앞으로 나갈수 있을것 같은데 도와주세요.감사합니다
chapter 15 실습에서 막힙니다. styled-components를 @latest 붙여서 다운받았는데도 실행이 안됩니다. 그냥 빈 하얀 화면만 뜹니다... 다른 챕터는 확인해보니까 다 되던데, 왜 styled-components 실습만 왜 안될까요? Blocks.jsx 파일 코드 import styled from "styled-components"; const Wrapper = styled.div` padding: 1rem; display: flex; flex-direction: row; align-items: flex-start; justify-content: flex-start; background-color: lightgrey; `; const Block = styled.div` padding: ${(props) => props.padding}; border: 1px solid black; border-radius: 1rem; background-color: ${(props) => props.backgroundColor}; color: white; font-size: 2rem; text-align: center; `; const blockItems = [ { label: "1", padding: "1rem", backgroundColor: "red", }, { label: "2", padding: "3rem", backgroundColor: "green", }, { label: "3", padding: "2rem", backgroundColor: "blue", }, ]; function Blocks(props) { return ( <Wrapper> {blockItems.map((blockItem) => { return ( <Block padding={blockItem.padding} backgroundColor={blockItem.backgroundColor} > {blockItem.label} </Block> ); })} </Wrapper> ); } export default Blocks; index.js 파일 코드 import React from "react"; import ReactDOM from "react-dom/client"; import "./index.css"; import App from "./App"; import reportWebVitals from "./reportWebVitals"; // import Library from "./chapter_03/Library"; // import Clock from "./chapter_04/Clock"; // import CommentList from "./chapter_05/CommentList"; // import NotificationList from "./chapter_06/NotificationList"; // import Accomodate from "./chapter_07/Accommodate"; // import ConfirmButton from "./chapter_08/ConfirmButton"; // import LandingPage from "./chapter_09/LandingPage"; // import AttendanceBook from "./chapter_10/AttendanceBook"; // import SignUp from "./chapter_11/SignUp"; // import Calculator from "./chapter_12/Calculator"; // import ProfileCard from "./chapter_13/ProfileCard"; // import DarkOrLight from "./chapter_14/DarkOrLight"; import Blocks from "./chapter_15/Blocks"; const root = ReactDOM.createRoot(document.getElementById("root")); root.render( <React.StrictMode> <Blocks /> </React.StrictMode> ); // If you want to start measuring performance in your app, pass a function // to log results (for example: reportWebVitals(console.log)) // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals reportWebVitals(); 빈 하얀 화면에서 F12 눌러서 오류 확인해보니까 이렇게 뜹니다. Warning: Each child in a list should have a unique "key" prop. Check the render method of Blocks . See https://reactjs.org/link/warning-keys for more information. at O ( http://localhost:3000/static/js/bundle.js:43804:6 ) at Blocks printWarning @ react-jsx-dev-runtime.development.js:87 2react.development.js:209 Warning: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons: 1. You might have mismatching versions of React and the renderer (such as React DOM) 2. You might be breaking the Rules of Hooks 3. You might have more than one copy of React in the same app See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem. printWarning @ react.development.js:209 react.development.js:1618 Uncaught TypeError: Cannot read properties of null (reading 'useContext') at Object.useContext (react.development.js:1618:1) at StyledComponent.ts:124:1 at O (StyledComponent.ts:190:1) at renderWithHooks (react-dom.development.js:16305:1) at updateForwardRef (react-dom.development.js:19226:1) at beginWork (react-dom.development.js:21636:1) at HTMLUnknownElement.callCallback (react-dom.development.js:4164:1) at Object.invokeGuardedCallbackDev (react-dom.development.js:4213:1) at invokeGuardedCallback (react-dom.development.js:4277:1) at beginWork$1 (react-dom.development.js:27451:1) 2react.development.js:209 Warning: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons: 1. You might have mismatching versions of React and the renderer (such as React DOM) 2. You might be breaking the Rules of Hooks 3. You might have more than one copy of React in the same app See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem. printWarning @ react.development.js:209 react.development.js:1618 Uncaught TypeError: Cannot read properties of null (reading 'useContext') at Object.useContext (react.development.js:1618:1) at StyledComponent.ts:124:1 at O (StyledComponent.ts:190:1) at renderWithHooks (react-dom.development.js:16305:1) at updateForwardRef (react-dom.development.js:19226:1) at beginWork (react-dom.development.js:21636:1) at HTMLUnknownElement.callCallback (react-dom.development.js:4164:1) at Object.invokeGuardedCallbackDev (react-dom.development.js:4213:1) at invokeGuardedCallback (react-dom.development.js:4277:1) at beginWork$1 (react-dom.development.js:27451:1) react-dom.development.js:18687 The above error occurred in the <styled.div> component: at O ( http://localhost:3000/static/js/bundle.js:43804:6 ) at Blocks Consider adding an error boundary to your tree to customize error handling behavior. Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries. logCapturedError @ react-dom.development.js:18687 react-dom.development.js:26923 Uncaught TypeError: Cannot read properties of null (reading 'useContext') at Object.useContext (react.development.js:1618:1) at StyledComponent.ts:124:1 at O (StyledComponent.ts:190:1) at renderWithHooks (react-dom.development.js:16305:1) at updateForwardRef (react-dom.development.js:19226:1) at beginWork (react-dom.development.js:21636:1) at beginWork$1 (react-dom.development.js:27426:1) at performUnitOfWork (react-dom.development.js:26557:1) at workLoopSync (react-dom.development.js:26466:1) at renderRootSync (react-dom.development.js:26434:1) 뭐가 문제일까요?
안녕하세요? 강의를 듣다가 궁금한 것이 생겨 질문 드립니다. 자바의 정렬 기본 알고리즘 시간 복잡도와 이진 탐색 시간 복잡도가 nlogn인 건 이해했는데, 코드부를 보면 이중 반복문이 나오고 있습니다. 앞 서 강의에서 반복문을 기준으로 이중 반복문이면 n의2승이라고 말씀하셨는데, 이 중 반복문을 썼는데도 nlogn이 되는 건 반복문이 진행되는 동안 절반씩 찾기 때문인가요?? 만약 이중 반복문으로 시간 복잡도가 올라간다면 이중 반복문을 쓰지 않고, 해결하는 방법을 알려주실 수 있으실까요?
main/index.js 에서는 setProducts( result.data .products); 로 써야하고 product/index.js 에서는 setProducts( result.data ); 로 써야하는데 두 파일에서 return문에서는 동등하게 { product.name } , {product.price} 등으로 사용됩니다. 둘의 차이를 알려주시면 감사하겠습니다.
import axios from 'axios'; 에서는 중괄호가 없고 import {Link} from 'react-router-dom' 에서는 중괄호가 있는데 차이가 뭔지 잘 모르겠습니다. axios는 'axios' 안에 있는 함수를 import 하는 것이고 {Link} 는 'react-router-dom' 안에 많은 컴포넌트 중 Link만 import 하기 위함인가요?
빈 배열을 선언해서 빈 배열에 (axios 통신을 통해 전달받은) result.data를 대입해서 사용하는 것이 아니라 useState를 사용하는 이유는 무엇인가요? 제가 이해한 것은 서버에 새로운 데이터가 업로드되면 그때마다 바로바로 업로드 된 데이터를 화면에 보여주기 위함인 것 같은데(예를 들어 상품이 3개로 보이다가 관리자가 상품을 한 개 추가하면 새로고침을 안해도 4개로 보임), 올바르게 이해한 것이 맞을까요?
클론페이지 및 개인포트폴리오 홈페이지 다 제작했는데 제 컴퓨터에서는 주소 들어가면 문제없이 나오지만 모니터가 조금 작은 다른컴퓨터에서 보니까 글씨, 이미지가 밀리거나 제 컴퓨터에서 본거랑은 다르게 좀 이상하게 나오는 경우가 있는데 회사에 지원했을때 상대방 모니터가 제꺼와 사이즈 차이가 날 경우 혹시 이상하게 보여질까바 걱정인데 단위의 문제일까요? 어떻게 수정하면 될까요?
1. interface클래스내에 정의된 메써드는 public abstract이고, 변수는 public static final이 자동으로 앞에 정의가 된다고 하셨는데 이건 고정인건가요? 다른 형태로 봐꿀 수 있나요? 봐꿀 수 없다면 왜 그러한지가 궁금합니다. interface 클래스를 implements해주고 추상클래스를 extends 해주는 것은 둘 다 상속인건가요? 둘다 부모 클래스가 되는건가요?
비전공자를 위한 풀스택 맛집지도 만들기 프로젝트!: Front, Back-end 그리고 배포까지
certbot을 통해 https를 적용한 뒤에 front 파일에 변경, 추가할 파일이 있어서 git pull origin main으로 시도해 봤지만 타임 아웃 에러가 걸리고 혹시 clone으로 하면 될까 해서 해봤지만 역시 타임아웃 에러가 걸렸습니다. 방법을 찾아보려고 열심히 구글링 2일간 해봤지만 도무지 개선이되질 않아서 ㅠㅠ 혹시 문제원인이나 해결방안 귀뜸해 주시면 감사하겠습니다.