173만명의 커뮤니티!! 함께 토론해봐요.
미해결
처음 만난 리액트(React)
안녕하세요. 질 높은 강의 덕분에 많은 도움 받고 있습니다. 다름이아니라 미니블로그 를 학습하며 이해가 되지 않는 부분이 있어서 질문드립니다. 44번째줄의 navigate(`/post/${item.id}`) 에 대한 질문입니다. item.id 값으로 data.id 의 값이 들어가는 것으로 확인했습니다. 제가 궁금한 것은 어떠한 방식으로 data.id 의 값이 item.id 값으로 들어가는지 도무지 이해가 되질 않습니다. 관련해서 답변주실 수 있으실까요?
김아무개_본계정
2024-02-21T10:47:55.863Z
댓글 2
좋아요 1
조회수 545
미해결
처음 만난 리액트(React)
Chapter 06 실습 문제에서 다음과 같은 경고와 함께 콘솔 로그가 나오지 않았습니다. Warning: ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot React 18버전에서는 ReactDOM에 렌더링하는 방식이 아니라 root를 먼저 만들고 root의 렌더링을 하는 방식으로 바뀌었다고 합니다.. 먼저, 실습 자료에서 따라 작성했던 코드입니다. import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; import reportWebVitals from './reportWebVitals'; import NotificationList from "./chapter_06/NotificationList"; ReactDOM.render( <React.StrictMode> <NotificationList /> </React.StrictMode>, document.getElementById('root') ) reportWebVitals(); Notification element는 순서대로 제대로 출력되는걸 보아서 JSX element는 제대로 작성한 것 같았고 콘솔 로그가 나오지 않으며 위에 작성한 오류만 나와 react 버전 문제인가 해서 공식문서를 참조해 다음과 같이 변경했습니다. import React from 'react'; import { createRoot } from 'react-dom/client'; import './index.css'; import reportWebVitals from './reportWebVitals'; import NotificationList from "./chapter_06/NotificationList"; const container = document.getElementById('root'); const root = createRoot(container); root.render( <NotificationList /> ); reportWebVitals(); ReactDOM을 직접 사용하지 않고, root를 만든 다음 root에서 렌더링을 하는 방식으로 변경하라고 해서 이렇게 했더니 콘솔 로그가 제대로 나왔습니다. 그런데 문제가 있는게 이전에는 Notification element가 1, 2, 3 순서대로 출력이 되었는데 root에 직접 렌더를 하니 1번과 2번 element가 동시에 출력되는 문제가 생깁니다.. 로그를 확인해보니 1번 2번 element는 componentDidMount() 이후 Update()를 실행하지 않고 WillUnmount()가 되어버립니다. WillUnmount() 이후에 한 번 더 DidMount()가 되고, Update()로 넘어가지만, 이 이후에도 1번 2번이 같이 호출되고, 그 다음에 3번이 호출됩니다. 3번 역시 DidMount() 이후 Update() 없이 WillUnmount()되고 다시 DidMount()가 됩니다 3번은 Update()되지 않습니다.. 이 이후에는 공식문서에서 해결책을 찾을수가 없어서 문의드립니다..
Skyleester
2024-02-21T09:59:06.876Z
댓글 3
좋아요 1
조회수 1211
미해결
처음 만난 리액트(React)
styled-component를 사용해서 코드를 작성했을 때 제 코드는 위와 같이 다 초록색으로 뜨는데 선생님 코드를 보면 CSS코드처럼 색상이 구분되어있습니다. 혹시 어떻게 해야지 색상이 구분이 되는건지 알 수 있을까요?!
김혜나
2024-02-21T06:27:26.996Z
댓글 1
좋아요 1
조회수 325
미해결
HTML+CSS+JS 포트폴리오 실전 퍼블리싱(시즌1)
안녕하세요, 강의 영상에서 페이지의 요소들을 모두 position 속성을 이용해 배치할거라 html 태그의 순서는 상관없다고 하셔서 시험삼아 logo 요소를 video 요소의 앞에 배치시켜봤습니다. 그랬더니 아래 화면처럼 logo 요소가 video의 위에 위치하고 z-index를 주거나 배경색을 transparent로 설정해도 바뀌지 않더라고요. 로고가 비디오 위에 오는건 html 태그의 순서의 영향이 있는거 같은데, 그러면 실제 웹사이트를 만들때도 html 태그들의 순서를 고려해서 배치해야 하나요? 사용한 html와 css 스크립트는 댓글에 첨부했습니다
hyoseok BANG
2024-02-20T10:48:04.491Z
댓글 2
좋아요 0
조회수 273
미해결
모바일 웹 퍼블리싱 포트폴리오 with Figma
강의내용을 기반으로 변형해서 개인포트폴리오용으로 만들 때 1.실제있는 모바일 웹사이트를 기반으로 제가 리뉴얼해서 만들어야하는건가요 ?? 2.그럼 사이트 안에 들어가는 이미지 같은 건 그 웹사이트에 있는 사진을 가져다가 개인 포트폴리오용에 써도 되는지(?)안된다면 어디서 사진을 갖다 써야하는지 궁금합니다.
HTML/CSS jquery 모바일-디자인 figma 포트폴리오
예림
2024-02-20T04:55:08.005Z
댓글 1
좋아요 1
조회수 247
미해결
처음 만난 리액트(React)
프로젝트 생성하는 데 오류가 생겨 질문 드립니다
2024-02-20T00:52:26.454Z
댓글 2
좋아요 0
조회수 1135
미해결
처음 만난 리액트(React)
DOM화면의 일부만 찾아서 수정해서 사용자에게 응답해준다고 하였는데 AJAX비동기 통신도 일부 구역만 변경해서 보여주는데 서로 관련이 있나요?? 아직 리액트 처음이라 궁금해서 질문 드려봅니다.
이동영
2024-02-20T00:22:31.002Z
댓글 1
좋아요 1
조회수 261
미해결
기초 알고리즘 코딩테스트 40일 완성 (by 하루코딩)
최댓값 문제 2566번인데 2556번(별 찍기 - 14)로 숫자가 잘못되어있습니다. 수정 부탁드립니다.
kairs294702
2024-02-19T10:20:10.561Z
댓글 2
좋아요 0
조회수 293
미해결
HTML+CSS+JS 포트폴리오 실전 퍼블리싱(시즌2)
이 햄버거 버튼을 active 넣었을때 바꾸려고 하는데 scss에는 도대체 어떻게 넣는지 너무 궁금해요 제가 강의 들으면서 계속 겪는 문제인데 scss에 .active를 적용해도 아무것도 안돼네요 scss 에 active 적용하려면 도대체 어떻게 해야할 지 모르곘어요 항상 강의들으면서 이 부분에서 막히는데 어떻게 해야할 지 도움 구합니다
tkddnjs1018
2024-02-19T08:36:17.047Z
댓글 1
좋아요 1
조회수 342
미해결
처음 만난 리액트(React)
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 이런 오류가 나오면서 따로 실행이 되지 않습니다
rkrdh727
2024-02-19T07:30:16.031Z
댓글 2
좋아요 1
조회수 484
미해결
처음 만난 리액트(React)
안녕하세요! 실습을 하던 도중 react@17 을 가지고 오는 것을 알게되었습니다! 현재 react@18도 나온 것 같은데 17로 실습하는게 나은지 18로도 해도 되는건지 여쭤보고 싶었습니다. 밑에 처럼 바꿔도 되는걸까요? <!-- 리액트 가져오기 --> <script src="https://unpkg.com/react@18/umd/react.development.js" crossorigin></script> <script src="https://unpkg.com/react-dom@18/umd/react-dom.development.js" crossorigin></script> <!-- 리액트 컴포넌트 가져오기 --> <script src="MyButton.js"></script>
김혜나
2024-02-18T12:27:00.738Z
댓글 1
좋아요 1
조회수 653
미해결
HTML+CSS+JS 포트폴리오 실전 퍼블리싱(시즌2)
■ 질문 남기실 때 꼭! 참고해주세요. font-size: 2.2em; 을했는데 크롬 디바이스툴에서는 전혀 줄어들지 않네요 ㅜㅠ 어떻게 해야할지 질문드립니다 저 크롬이 문제인가요??
tkddnjs1018
2024-02-16T11:21:31.131Z
댓글 2
좋아요 1
조회수 1220
해결됨
면접과 취업을 부르는 '퍼블리셔 개인 포트폴리오 홈페이지' 제작
선생님 안녕하세요! 제가 포토샵 공부는 하고 있는데 포토샵이 아직 익숙치는 않아서 skill 섹션에 포토샵 대신에 figma를 넣고 싶은데요 올려주신 참고 텍스트에는 Figma가 없어서 혼자 이렇게 저렇게 적어보았는데 썩 좋아보이지가 않네요ㅠㅠ 괜찮은 문구 짧게나마 부탁좀 드려도 될까요?
이종주
2024-02-16T09:04:39.340Z
댓글 1
좋아요 1
조회수 261
미해결
반응형 웹사이트 포트폴리오(Architecture Agency)
@media (max-width:768px) { /* html { scroll-behavior: smooth; } */ /* Entire Layout */ .cd-section { height: auto; } .cd-section > div { height: auto; } .content { position: static; width: 100%; height: 100%; } /* Header */ header { transition: 0.5s; z-index: 100; } header.active { background-color: #fff; border-bottom: 1px solid #eee; } .menu { display: block; } .slogan { display: none; } .gnb { background-color: #fff; position: fixed; top: 0; right: -270px; width: 250px; height: 100vh; box-shadow: -5px 0 10px rgba(0, 0, 0, 0.1); transition: 0.5s; } .gnb.active { right:0; } .menu { margin-top: 60px; line-height: 40px; } .menu a { display: block; text-align: right; padding-right: 20px; color: #000; font-size: 20px; } /* Trigger */ .trigger { display: block; width: 24px; height: 14px; position: absolute; top: 20px; right: 20px; } .trigger span { position: absolute; height: 1px; width: 100%; background-color: #000; transition: 0.5s; } .trigger span:nth-child(1) { top: 0; } .trigger span:nth-child(2) { top: 50%; width: 80%; } .trigger span:nth-child(3) { top: 100%; } .trigger.active span:nth-child(1) { top: 50%; transform: rotate(45deg); } .trigger.active span:nth-child(2) { top: 50%; width: 80%; opacity: 0; } .trigger.active span:nth-child(3) { top: 50%; transform: rotate(-45deg); } /* go to top */ .gototop { position: fixed; bottom: 20px; left: 20px; border: 1px solid #fff; display: block; width: 40px; height: 40px; border-radius: 50%; text-align: center; line-height: 50px; transform: translateY(0px); opacity: 0; } .gototop.active { opacity: 1; } .btn-hiring { right: 20px; bottom: 20px; } .cd-vertical-nav { display: none; } /* Show Hide Section */ /* #home, #about, #project, #plan, #awards, #location, #contact { display: none; } */ /* ############# section : Home ############# */ .home-inner { height: 100vh; } .welcome-text { transform: translate(-50%, -50%) scale(0.7); width: 100%; /* border: 2px solid red; */ } .home-heading { left: 20px; } .home-heading span { font-size: 50px; } }
audlovewns
2024-02-16T02:57:36.612Z
댓글 1
좋아요 2
조회수 253
미해결
반응형 웹사이트 포트폴리오(Architecture Agency)
/* Google Web Font : Montserrat */ @import url('https://fonts.googleapis.com/css?family=Montserrat:200,300,400,500&display=swap'); @import url('https://fonts.googleapis.com/css?family=Manrope:300,400,500,600&display=swap'); @import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@200;300;400;600;700;900&display=swap'); @import url('https://fonts.googleapis.com/css2?family=Overpass&display=swap'); /* FontAwesome CDN 4.7 */ @import url('https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css'); /* source sans */ @import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@200;300;400;600&display=swap'); /* Overpass */ @import url('https://fonts.googleapis.com/css2?family=Overpass&display=swap'); /* Reset CSS */ * { box-sizing: border-box; } ul { list-style: none; padding: 0; } a { text-decoration: none; } /* Default CSS */ body { font-family: 'Montserrat', sans-serif; color: #222; font-size: 15px; margin: 0; height: 100vh; background-color: #fff; } /* Entire Layout */ .cd-section { height: 100vh; } .cd-section > div { height:100%; position: relative; } .content { background-color: #ddd; position: absolute; width: calc(100% - 40px); height: calc(100% - 80px); left: 20px; bottom: 20px; overflow: hidden; } /* Header */ header { position: fixed; top:0; left:0; width: 100%; } .gnb-inner { /* border: 1px solid #000; */ width: calc(100% - 40px); margin: auto; height: 60px; line-height: 60px; } .logo { float: left; } .logo img { padding-top: 17px; } .gnb { float: right; } .menu { display: none; } .menu a {} .slogan { font-size: 16px; font-style: italic; } .trigger { display: none; } /* Hiring button */ .btn-hiring { position: fixed; right: 50px; bottom: 50px; color: #fff; background-color: #000; padding: 10px 20px; border-radius: 20px; box-shadow: 5px 5px 20px rgb(0, 0, 0, 0.3); transition: 0.5s; } .btn-hiring .fa-solid { transform: rotateY(180deg); margin-right: 5px; } .btn-hiring:active { transform: scale(0); } /* ############# section : Home ############# */ .home-inner { background-color: #fff; height: 100%; } .home-inner::before { content: ''; background-color: #000; position: absolute; width: 0; height: 100%; top: 0; left: 0; animation: overlay 1s 2.5s ease-in-out; /* display: none; */ } .welcome-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 50px; font-weight: 300; text-align: center; line-height: 1.2em; margin: 0; font-family: 'Source Sans 3', sans-serif; animation: slideup 2s linear; animation-fill-mode: both; /* display: none; */ } .welcome-text span { display: block; font-size: 26px; } .welcome-text span .fa { color: crimson; } .opacity-image { background: url('images/section-bg-01.jpg') no-repeat center center; background-size: cover; height: 100%; opacity: 0; animation: opacity-image 1s 3s ease-in both; /* display: none; */ } .home-heading { /* display: none; border: 1px solid red;*/ position: absolute; top: 50%; /* left: 40%; */ left: 300px; /* margin-left: 200px; */ transform: translateY(-50%); } .home-heading span { display: block; font-size: 115px; color: #fff; font-weight: 600; width: 0; overflow: hidden; animation: reveal 1s 3s ease-in-out both; } .home-heading span:nth-child(1) { animation-delay: 3s; } .home-heading span:nth-child(2) { animation-delay: 3.2s; } .home-heading span:nth-child(3) { animation-delay: 3.4s; } @keyframes slideup { 0% { opacity: 0; margin-top: 50px; } 20% { opacity: 1; margin-top: 0; } 80% { opacity: 1; margin-top: 0; } 100% { opacity: 0; } } @keyframes overlay { 0% { width: 0; left: 0; } 50% { width: 100%; left: 0; } 100% { width: 0; /* right: 0; */ left: 100%; } } @keyframes opacity-image { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes reveal { 0% { width: 0; } 100% { width: 100%; } }
audlovewns
2024-02-16T02:56:36.455Z
댓글 1
좋아요 2
조회수 336
미해결
반응형 웹사이트 포트폴리오(Architecture Agency)
/* document ready랑 같은거 = html을 다 읽은 후 실행해라고 표시 */ /* Trigger */ $(function(){ $('.trigger').click(function(){ $(this).toggleClass('active') $('.gnb').toggleClass('active') }) $('section, .menu a').click(function(){ $('.gnb').removeClass('active') $('.trigger').removeClass('active') }) /* smooth Scrolling */ $('.menu a, .gototop').click(function(e){ $.scrollTo(this.hash || 0, 900) }) /* chacng CSS with Scroll */ // 스크롤을 한 상태 if 스크롤을 안한상태 else $(window).scroll(function(){ if($(window).scrollTop() > 50) { $('header, .gototop').addClass('active') } else { $('header, .gototop').removeClass('active') } }) // slick.js History $('.history-slider').slick({ dots: true, infinite: true, speed: 300, slidesToShow: 4, slidesToScroll: 2, responsive: [ { breakpoint: 1024, settings: { slidesToShow: 3, slidesToScroll: 3, infinite: true, dots: true } }, { breakpoint: 600, settings: { slidesToShow: 2, slidesToScroll: 2 } }, { breakpoint: 480, settings: { slidesToShow: 1, slidesToScroll: 1 } } // You can unslick at a given breakpoint now by adding: // settings: "unslick" // instead of a settings object ] }) // slick.js project photo1 $('.project-photo').slick({ dots : true, infinite : true, speed : 500, fade : true, autoplay : true, autoplaySpeed : 2000, cssEase : 'linear' }) })
audlovewns
2024-02-16T02:55:24.833Z
댓글 1
좋아요 2
조회수 296
미해결
반응형 웹사이트 포트폴리오(Architecture Agency)
수업진행을 하는 과정에 있어서 제가 문제를 찾아볼려고 했는데 못찾아서 질문을 드립니다. PC에서 모바일 화면으로 전환되면 GNB메뉴가 항시 OPEN되어있는 상태로 화면이 보이게 되면서 계속 GNB메뉴를 닫아야하더라구요. 선생님께서는 그런 문제가 없어보여서요. 선생님 소스를 복사해서 붙여넣기도 해봤는데요.. 제 쪽에서는 항시 OPEN되서 보이더라구요 제가 문제해결을 하지 못해서 여쭈어봅니다. 소스는 많지만.. 아래와 같습니다. <!doctype html> <html lang="ko"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- <meta name="viewport" content="width=device-width, initial-scale=1"> --> <title>DesignAgency SIYU Family</title> <link rel="icon" href="images/favicon.png"> <script src="/js/jquery-2.1.4.js"></script> <!-- <script src="/js/velocity/modernizr.js"></script> --> <script src="/js/velocity/velocity.min.js"></script> <script src="/js/velocity/velocity.ui.min.js"></script> <script src="/js/velocity/main.js"></script> <link rel="stylesheet" href="/js/velocity/velocity.css"> <!-- smooth Scrolling --> <script src="js/jquery.scrollTo.min.js"></script> <!-- slick.js --> <script src="js/slick/slick.min.js"></script> <link rel="stylesheet" href="js/slick/slick-theme.css"> <link rel="stylesheet" href="js/slick/slick.css"> <!-- featherlight.js --> <script src="js/featherlight/featherlight.js"></script> <link rel="stylesheet" href="js/featherlight/featherlight.css"> <!-- custom Js & CSS --> <script src="custom.js"></script> <link rel="stylesheet" href="style.css"> <link rel="stylesheet" href="responsive.css"> <!-- fontawesome --> <script src="https://kit.fontawesome.com/f7c955b0b1.js" crossorigin="anonymous"></script> </head> <!-- hijacking: on/off - animation: none/scaleDown/rotate/gallery/catch/opacity/fixed/parallax --> <body data-hijacking="on" data-animation="rotate"> <!-- S : container --> <div class="container"> <!-- S : Home --> <section class="cd-section visible" id="home"> <div> <div class="content"> <div class="home-inner"> <h3 class="welcome-text"> You can do it <span>with SIYU family <i class="fa fa-heart"></i></span> </h3> <div class="opacity-image"></div> <div class="home-heading"> <span>Creative</span> <span>Architecture</span> <span>Specialists</span> </div> </div> </div> </div> </section> <!-- E : Home --> <!-- S : header --> <header class="active"> <div class="gnb-inner"> <div class="logo"> <a href="/"> <img src="images/logo.png" alt="로고" /> </a> </div> <!-- S : gnb --> <div class="gnb active"> <div class="menu"> <a href="#home">Home</a> <a href="#about">About</a> <a href="#project">Project</a> <a href="#plan">Plan & History</a> <a href="#awards">Awards</a> <a href="#location">Location</a> <a href="#contact">Contact</a> </div> <div class="slogan">We design places, not projects.</div> </div> <div class="trigger active"> <span></span> <span></span> <span></span> </div> <!-- E : gnb --> </div> </header> <!-- E : header --> </div> <!-- E : container --> <a href="#" class="gototop"> <img src="images/gototop.png" alt="맨 위로"> </a> <a href="hiring.html" class="btn-hiring" data-featherlight="iframe"> <i class="fa-solid fa-comment-dots"></i> Hiring </a> <nav> <ul class="cd-vertical-nav"> <li><a href="#0" class="cd-prev inactive">Next</a></li> <li><a href="#0" class="cd-next">Prev</a></li> </ul> </nav> </body> </html>
audlovewns
2024-02-16T02:52:20.315Z
댓글 1
좋아요 2
조회수 465
미해결
비전공자를 위한 진짜 입문 올인원 개발 부트캠프
윈도우 11에서 npm install -g sequelize sqlite3 설치가 안됩니다 유사 답변 참고해도 설치가 안되네요 아래 문구가 나왔을 땐 어떻게 어떤 방법으로 접근하는 게 좋을까요? npm WARN deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs added 146 packages in 6s 13 packages are looking for funding run npm fund for details
HTML/CSS javascript react node.js react-native 머신러닝 express tensorflow
kobaydesign
2024-02-16T01:55:07.965Z
댓글 2
좋아요 0
조회수 529
해결됨
[코드캠프] 시작은 프리캠프
안녕하세요. 회원가입 과제를 하기위해 링크된 피그마를 확인해보니 개발자모드를 이용하려면 유료 플랜에 가입해야 하는 것 같습니다. 해결방법이 있을까요?
장승운/학생/컴퓨터공학
2024-02-15T09:30:51.659Z
댓글 1
좋아요 0
조회수 1699
해결됨
[코드캠프] 강력한 CSS
질문 ) 혼자 실습해본다고 모 홈페이지 하나 클론코딩하는 중인데 header 부분에서 만들다가 막혔습니다.... 그래서 https://www.w3schools.com/howto/howto_js_accordion.asp 여기서 기초적인 연습을 하고 있는데 flex와 grid를 사용하지않더라구요. 위 처럼 기초적인 연습을 할 수 있고, flex grid 쓰는 사이트가 있을까요? 있으시다면 추천 부탁드립니다!!!
yho79555
2024-02-15T06:35:21.818Z
댓글 1
좋아요 0
조회수 350