멀티 선택 단축키
해결됨
기초부터 배우는 Next YTMusic 클론 코딩 (with next.js 14, UI 마스터)
2분 50초쯤에서 멀티선택 하는 방법 알려주시면 감사하겠습니다!!
- react
- 인터랙티브-웹
- 클론코딩
- next.js
- tailwind-css
- zustand
173만명의 커뮤니티!! 함께 토론해봐요.
해결됨
기초부터 배우는 Next YTMusic 클론 코딩 (with next.js 14, UI 마스터)
2분 50초쯤에서 멀티선택 하는 방법 알려주시면 감사하겠습니다!!
해결됨
Next + React Query로 SNS 서비스 만들기
궁금 한게 있어서 여쭤 봅니다 ㅎㅎ useMutation을 사용 하였을때 prefetchQuery의 queryKey에 데이터를 저장해 놓고 useQueryClient에 데이터를 넣어 두둣이 onSuccess를 했을때 queryKey처럼 데이터를 저장 할 수 있을까요? 저스탠드와 같은 라이브러리 없이 혹시 쿼리에서 uuseMutation을 했을때 캐쉬 값을 가지고 있을 수 있을까요?!
해결됨
[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)
학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! 질문과 관련된 영상 위치를 알려주면 더 빠르게 답변할 수 있어요 먼저 유사한 질문이 있었는지 검색해보세요 원핫 인코딩에서 0,1이 아니고 False,True가 나옴
해결됨
Airflow 마스터 클래스
powershell에서 wsl --install을 입력한 후에 ubuntu 시작하는중... 이 출력되고 그 다음에 응답이 없는데 이런 경우 어떻게 해야할까요?
미해결
따라하며 배우는 리액트 A-Z[19버전 반영]
강사님은 내부적으로 Banner.css에 대한 내용을 복붙하셨는데, 강의 영상에서 Banner.css 내에 소스가 다표기가 되지 않아서 동일하게 진행하기 어려운 것 같습니다.
미해결
Next + React Query로 SNS 서비스 만들기
▲ Next.js 14.2.1 - Local: http://localhost:3000 ✓ Starting... ✓ Ready in 5.2s ○ Compiling / ... ✓ Compiled / in 5.5s (583 modules) GET / 200 in 5896ms TypeError: rt.toLowerCase is not a function at C:\Users\KimByeongHwa\Desktop\inflearn\z-com\node_modules\next\dist\compiled\webpack\bundle5.js:30:274042 at finishResolved (C:\Users\KimByeongHwa\Desktop\inflearn\z-com\node_modules\next\dist\compiled\webpack\bundle5.js:3:192383) at C:\Users\KimByeongHwa\Desktop\inflearn\z-com\node_modules\next\dist\compiled\webpack\bundle5.js:3:193267 at C:\Users\KimByeongHwa\Desktop\inflearn\z-com\node_modules\next\dist\compiled\webpack\bundle5.js:3:194059 at eval (eval at create (C:\Users\KimByeongHwa\Desktop\inflearn\z-com\node_modules\next\dist\compiled\webpack\bundle5.js:15:28858), <anonymous>:12:1) ... at C:\Users\KimByeongHwa\Desktop\inflearn\z-com\node_modules\next\dist\compiled\webpack\bundle5.js:3:194059 at eval (eval at create (C:\Users\KimByeongHwa\Desktop\inflearn\z-com\node_modules\next\dist\compiled\webpack\bundle5.js:15:28858), <anonymous>:13:1) at C:\Users\KimByeongHwa\Desktop\inflearn\z-com\node_modules\next\dist\compiled\webpack\bundle5.js:3:194059 at eval (eval at create (C:\Users\KimByeongHwa\Desktop\inflearn\z-com\node_modules\next\dist\compiled\webpack\bundle5.js:15:28858), <anonymous>:12:1) at C:\Users\KimByeongHwa\Desktop\inflearn\z-com\node_modules\next\dist\compiled\webpack\bundle5.js:3:204068 at Hook.eval [as callAsync] (eval at create (C:\Users\KimByeongHwa\Desktop\inflearn\z-com\node_modules\next\dist\compiled\webpack\bund ○ Compiling /home ... 화면이 버벅거릴 정도로 에러 코드가 길어서 어쩔 수 없이 잘라서 올립니다. < 현재 상황 > npm run dev 하면 바로 TypeError: rt.toLowerCase is not a function 에러가 발생합니다. 에러가 발생해도 첫 랜딩 화면은 렌더링 됩니다. 그러나 주소창에 url 입력하여 페이지 이동 시 에러 코드 맨 마지막 줄 처럼 무한 로딩이 걸리고 아무 것도 안됩니다. < 시도 해 본 것> https://stackoverflow.com/questions/78321779/typeerror-rt-tolowercase-is-not-a-function-nextjs 를 따라 npm 재설치 => 실패 프로젝트 폴더 삭제 후 재설치 => 실패 다른 구글링 자료를 보면 13버전을 사용하라고 하는데, 14버전 강의를 듣기에 적용할 수 없는 해결책
미해결
Next + React Query로 SNS 서비스 만들기
강의 3:53초 부분에 회원가입을 하자마자 로그인을 하면 useSession에 값이 제대로 들어오지 않는다고 하셨는데 라이브러리 자체 오류인가요 아니면 onSubmit에서 회원가입 플로우 직후 redirect("/home")하는 부분이 영향을 받아서 그런건가요?
미해결
Next + React Query로 SNS 서비스 만들기
react-query에서 하나의 궁금 증이 있는데 제가 아직 다 안봐서 헷갈릴 수도 있긴 하겠지만 prefetchQuery의 경우는 post, pus, delete 등의 메소드 일때는 사용 하지 않고 대부분 get일때만 사용 하나요?! post, pus, delete 의 메소드들은 Mutation으로 사용 된다고 생각 하면 될까요?! 헷갈리네요 ㅠㅠ prefetchQuery말고 axios 와 같은 라이브러리를 붙여서 사용 해도 될까요?! fatch 를 사용 하셔서 한번 여쭤 봅니다 ㅎㅎ
미해결
Next + React Query로 SNS 서비스 만들기
Suspense 컴포넌트를 아래처럼 TabDeciderSuspense 컴포넌트 안에 포함시켰더니 데이터 페칭하는 동안 Tab, PostForm 컴포넌트가 로딩 스피너 때문에 보이지 않던데 Suspense 컴포넌트는 데이터 페칭하는 컴포넌트 밖으로 무조건 빼야 제대로 동작하는 건가요? <Suspense fallback={"Loading..."}> <HydrationBoundary state={dehydratedState} queryClient={queryClient}> <TabDecider /> </HydrationBoundary> </Suspense>
미해결
[리뉴얼] React로 NodeBird SNS 만들기
안녕하십니까 형님 진행하다 보니 궁금한게 생겨서 여쭤보려고 합니다. reducer설정 중 초기값이 undefined로 들어오는 에러가 놔왔었는데욥 error - Error: The slice reducer for key "user" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined. 에러 났던 부분운 default: state 이 부분이고 코드 보고 아래처럼 수정하니 잘 동작했습니다. export const initialState = { isLoggedIn: false, user: null, signUpData: {}, loginData: {}, } const reducer = (state=initialState, action) => { switch(action.type) { default: { return { ...state } } } } default: state vs default: { return {...state}} 문법적으로 똑같은 내용이 아닌지...어떤 차이가 있는지를 모르겠어서 질문드립니다!
미해결
Next + React Query로 SNS 서비스 만들기
제로초님이 강의 하시다 Link태그 안에 img 태그를 넣는 방식으로 하시다가 사진 두개를 넣는 부분 부터 이작업을 안하셨는데 두번 째 방식까지는 .postImageSection img { border-radius: 16px; height: 100%; width: 100%; } img 태그에 100%를 주는 방법으로 해결했지만 그림 3개를 넣는 부분 부터는 크기가 맞지 않습니다 어떻게 해결하면 크기가 정확히 맞을까요? if (post.Images.length === 3) { return ( <div className={cx(style.postImageSection, style.threeImage)}> <Link href={`/${post.User.id}/status/${post.postId}/photo/${post.Images[0].imageId}`} style={{ backgroundImage: `url(${post.Images[0]?.link})`, backgroundSize: "cover", }} > <img src={post.Images[1]?.link} alt="" /> </Link> <div> <Link href={`/${post.User.id}/status/${post.postId}/photo/${post.Images[1].imageId}`} style={{ backgroundImage: `url(${post.Images[1]?.link})`, backgroundSize: "cover", }} > <img src={post.Images[1]?.link} alt="" /> </Link> <Link href={`/${post.User.id}/status/${post.postId}/photo/${post.Images[2].imageId}`} style={{ backgroundImage: `url(${post.Images[2]?.link})`, backgroundSize: "cover", }} > <img src={post.Images[2]?.link} alt="" /> </Link> </div> </div> );
해결됨
[신규 개정판] 이것이 진짜 엑셀자동화다 - 기본편
안녕하세요 네이버 메일 자동화 코드를 실행하면 메일 쓰기 버튼을 계속 찾지 못하고 있어 어떻게 수정하면 될지 문의드립니다. 메일함 이동까지는 정상적으로 되고 있으나 메일 쓰기 버튼만 찾지 못하고 있습니다. 코드는 다음과 같습니다. from selenium.webdriver import ChromeOptions from selenium import webdriver from selenium.webdriver.chrome.service import Service as ChromeService from webdriver_manager.chrome import ChromeDriverManager from selenium.webdriver.common.by import By import time import pyperclip import pyautogui from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC options = ChromeOptions() options.add_experimental_option("detach", True) driver = webdriver.Chrome(service=ChromeService(ChromeDriverManager().install()), options=options) driver.get('https://nid.naver.com/nidlogin.login?mode=form&url=https://www.naver.com/') driver.maximize_window() # 화면 최대화 # 아이디 입력창 id = driver.find_element(By.CSS_SELECTOR, '#id') id.click() pyperclip.copy('eooe5173') pyautogui.hotkey('ctrl', 'v') time.sleep(2) # 비밀번호 입력창 passward = driver.find_element(By.CSS_SELECTOR, '#pw') passward.click() pyperclip.copy('ssw471395~') pyautogui.hotkey('ctrl', 'v') time.sleep(2) # 로그인 버튼 driver.find_element(By.CSS_SELECTOR, '#log\.login').click() time.sleep(5) # 메일함으로 이동 mailbox = driver.find_element(By.CSS_SELECTOR,'#shortcutArea > ul > li:nth-child(1) > a').click() time.sleep(5) # 내게 쓰기 버튼 writeme_button =driver.find_element(By.CSS_SELECTOR, '#root > div > nav > div > div.lnb_header > div.lnb_task > a.item.button_write').click() # 메일 제목 입력창 및 입력 mailname = driver.find_element(By.CSS_SELECTOR, '#subject_title').click() pyperclip.copy('안녕하세요') pyautogui.hotkey('ctrl', 'v') time.sleep(5) # 메일 내용 입력창 및 입력 mailinfo = driver.find_element(By.CSS_SELECTOR, '#body > div > div.workseditor-content').click() pyperclip.copy('네이버 메일 자동화입니다.') pyautogui.hotkey('ctrl', 'v') time.sleep(5) # 메일 저장 mailsave = driver.find_element(By.CSS_SELECTOR, '#content > div.mail_toolbar.type_write > div:nth-child(1) > div > button.button_write_task').click() time.sleep(5) 에러는 동일하게 다음과 같이 노출되고 있습니다. selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"#root > div > nav > div > div.lnb_header > div.lnb_task > a.item.button_write"} (Session info: chrome=123.0.6312.123) Stacktrace: GetHandleVerifier [0x00D14CA3+225091] (No symbol) [0x00C44DF1] (No symbol) [0x00AE9A7A] (No symbol) [0x00B2175B] (No symbol) [0x00B2188B] (No symbol) [0x00B57882] (No symbol) [0x00B3F5A4] (No symbol) [0x00B55CB0] (No symbol) [0x00B3F2F6] (No symbol) [0x00B179B9] (No symbol) [0x00B1879D] sqlite3_dbdata_init [0x01189A43+4064547] sqlite3_dbdata_init [0x0119104A+4094762] sqlite3_dbdata_init [0x0118B948+4072488] sqlite3_dbdata_init [0x00E8C9A9+930953] (No symbol) [0x00C507C4] (No symbol) [0x00C4ACE8] (No symbol) [0x00C4AE11] (No symbol) [0x00C3CA80] BaseThreadInitThunk [0x764EFCC9+25] RtlGetAppContainerNamedObjectPath [0x77DE7C5E+286] RtlGetAppContainerNamedObjectPath [0x77DE7C2E+238]
미해결
Next + React Query로 SNS 서비스 만들기
제로초님 안녕하세요. 강의 활용 방안에 대해서 간단한 질문이 있어서 글 남깁니다. 제가 해당 강의를 듣는 이유는 Next.js에 대한 학습이며 이와 더불어 추가적으로 활용하시는 기술 (웹소켓 등) 을 함께 학습하는 것이며, 최대한 빠르게 개념을 잡고 혼자서 사이드 프로젝트 등을 만들며 익숙해지는 것이 목적입니다. 본래는 강의 초반부에 추천해주신 것처럼 일정 부분 강의를 수강한 후 올려주시는 예시 코드를 바탕으로 직접 코드를 짜며 비교해보는 방식으로 활용해보려 했습니다. 하지만 해당 방식에 다소 불편함이 있어서 (ex. 올려주신 예시 코드에서도 로그인/아웃 기능이 구현되지 않은 상황이라 화면 구현하는데 다소 불편함이 따르는 등) 먼저 강의를 보기만 하는 식으로 완강한 후 배운 내용을 바탕으로 혼자서 구현해보는 방식으로 활용해보려 합니다. 관련하여 혹시 보다 추천하시는 방법이 있으신지 궁금해서 질문글 남기게 되었습니다.
미해결
Next + React Query로 SNS 서비스 만들기
강의 언제나 잘보고 있습니다. 따로 작업하다가 난감한게 있어서 문의드립니다. 예를 들어 ["ABC"] 라는 캐시가 있다는 가정하에 A페이지, B페이지에서 해당 캐시를 사용합니다. 이때 질문이 있습니다. A,B 페이지에서 useQuery로 데이터를 불러올 경우 실수로 A와 B가 다른 queryFn이 정의 되어있을 때, InvalidateQueries를 해도 데이터가 미스매칭될 수 있는 가능성이 존재할까요? prefetchQuery 사용 시, A페이지와 B페이지가 ABC라는 데이터가 공통으로 필요할 경우, A페이지에서 prefetchQuery를 읽어서 B로 가면 A의 ABC를 캐시해서 B에서도 사용 가능한 걸로 알고있는데요. 이럴때 만일 B페이지로 바로 접근이 가능할 경우, B 페이지에서도 prefetchQuery를 적용해야 둘다 SSR이 제대로 적용되는걸까요?
미해결
한 입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지
10.3) React.memo와 컴포넌트 렌더링 최적화 위 강의를 보다보니, 뭔가 이상해서 질문드립니다... 여기서 Header컴포넌트에 memo함수로 감싸서 최적화된 컴포넌트를 만드셨다고 했는데, 영상으로만 보면 item 컴포넌트 변경시에 리랜더링이 안되야 하는 Header 컴폰넌트에 highLight가 들어가는데요..(4:46 경..) 아무리 봐도 하이라이트가 들어가는데, 말씀으로는 하이라이트가 더이상 들어가지 않는다고 하는데, 제가 뭘 잘못 이해한걸까요?
해결됨
Next + React Query로 SNS 서비스 만들기
안녕하세요 선생님. 이번 강좌에서 숙제로 내주신 부분(div로 radio버튼 만들기) 을 진행하다가 문득 궁금증이 생겼는데요. <input type="radio">가 많을때 useRef을 하나씩 만들어서 일일이 1대1 매칭으로 접근해야 하는건가요? 혹은 ref값을 빈배열로 만든 뒤 배열의 값을 radio 버튼의 value로 채워서 해당 배열의 인덱스 값으로 참조해야하는 걸까요?
미해결
Next + React Query로 SNS 서비스 만들기
안녕하세요 섹션3의 3번째 강의 server action을 보고 있는데요 const submit에서 에러가 발생해서 질문합니다. const submit에서 서버액션을 사용하기 위해 "use server"를 넣었는데 다음과 같은 에러가 발생합니다. ./src/app/(beforeLogin)/_component/SignupModal.tsx Error: × It is not allowed to define inline "use server" annotated Server Actions in Client Components. │ To use Server Actions in a Client Component, you can either export them from a separate file with "use server" at the top, or pass them down through props from a Server Component. │ │ Read more: https://nextjs.org/docs/app/api-reference/functions/server-actions#with-client-components │ ╭─[/home/tpark/SNS/z-com/src/app/(beforeLogin)/_component/SignupModal.tsx:3:1] 3 │ import { redirect } from "next/navigation"; 4 │ 5 │ export default function SignupModal() { 6 │ ╭─▶ const submit = async (formData: FormData) => { 7 │ │ "use server"; 8 │ │ if (!formData.get("id")) { 9 │ │ return "아이디를 입력하세요."; 10 │ │ } 11 │ │ if (!formData.get("name")) { 12 │ │ return "닉네임을 입력하세요."; 13 │ │ } 14 │ │ if (!formData.get("password")) { 15 │ │ return "비밀번호를 입력하세요."; 16 │ │ } 17 │ │ if (!formData.get("image")) { 18 │ │ return "이미지를 업로드하세요."; 19 │ │ } 20 │ │ if (!formData.get("id")) { 21 │ │ return "이미 사용 중인 아이디입니다."; 22 │ │ } 23 │ │ 24 │ │ let shouldRedirect = false; 25 │ │ try { 26 │ │ const response = await fetch( 27 │ │ `${process.env.NEXT_PUBLIC_BASE_URL}/api/users`, 28 │ │ { 29 │ │ method: "post", 30 │ │ body: formData, 31 │ │ credentials: "include", 32 │ │ } 33 │ │ ); 34 │ │ console.log(response.status); 35 │ │ if (response.status === 403) { 36 │ │ return { message: "user_exists" }; 37 │ │ } 38 │ │ console.log(await response.json()); 39 │ │ shouldRedirect = true; 40 │ │ } catch (err) { 41 │ │ console.error(err); 42 │ │ } 43 │ │ if (shouldRedirect) { 44 │ │ redirect("/home"); 45 │ │ } 46 │ ╰─▶ }; 47 │ return ( 48 │ <> 49 │ <div className={style.modalBackground}> ╰──── 서버 액션부분을 다른 컴포넌트로 분리해서 사용해야 하는거 같은데 강의 내용에서는 바로 진행이 되서 제가 어느부분이 잘못되었는지 잘 모르겠습니다. 그리고 혹시 최상단에 "use client"를 작성하지 않았기에 이건 서버컴포넌트인줄 알았는데 에러메세지에 클라이언트 컴포넌트에서 사용할 수 없다는건 현재 컴포넌트가 클라이언트 컴포넌트인건가요...? 아래는 제가 작성한 코드입니다. import style from "./signup.module.css"; import BackButton from "./BackButton"; import { redirect } from "next/navigation"; export default function SignupModal() { const submit = async (formData: FormData) => { "use server"; if (!formData.get("id")) { return "아이디를 입력하세요."; } if (!formData.get("name")) { return "닉네임을 입력하세요."; } if (!formData.get("password")) { return "비밀번호를 입력하세요."; } if (!formData.get("image")) { return "이미지를 업로드하세요."; } if (!formData.get("id")) { return "이미 사용 중인 아이디입니다."; } let shouldRedirect = false; try { const response = await fetch( `${process.env.NEXT_PUBLIC_BASE_URL}/api/users`, { method: "post", body: formData, credentials: "include", } ); console.log(response.status); if (response.status === 403) { return { message: "user_exists" }; } console.log(await response.json()); shouldRedirect = true; } catch (err) { console.error(err); } if (shouldRedirect) { redirect("/home"); } }; return ( <> <div className={style.modalBackground}> <div className={style.modal}> <div className={style.modalHeader}> <BackButton /> <div>계정을 생성하세요.</div> </div> <form action={submit}> <div className={style.modalBody}> <div className={style.inputDiv}> <label className={style.inputLabel} htmlFor="id"> 아이디 </label> <input id="id" name="id" className={style.input} type="text" placeholder="" required /> </div> <div className={style.inputDiv}> <label className={style.inputLabel} htmlFor="name"> 닉네임 </label> <input id="name" name="name" className={style.input} type="text" placeholder="" required /> </div> <div className={style.inputDiv}> <label className={style.inputLabel} htmlFor="password"> 비밀번호 </label> <input id="password" name="password" className={style.input} type="password" placeholder="" required /> </div> <div className={style.inputDiv}> <label className={style.inputLabel} htmlFor="image"> 프로필 </label> <input id="image" name="image" className={style.input} type="file" accept="image/*" required /> </div> </div> <div className={style.modalFooter}> <button type="submit" className={style.actionButton}> 가입하기 </button> </div> </form> </div> </div> </> ); }
해결됨
코드로 배우는 React 19 with 스프링부트 API서버
프론트 부분에서 ESLint 때문에 계속 에러를 겪고 있는데요,, 해결했다 싶으면 신기하게도 다음번 컴퓨터를 키면 또 에러가 생겨있고 그러는데요, 빨간색 에러는 없앴는데 노란색 경고글도 없애고 싶습니다. 아래 노란색 경고글들도 없앨수 있는 방법이 있을까요... 에러때문에 이것저것 시도하다가 뭔가 버전이 안맞는 걸까요...
미해결
Next + React Query로 SNS 서비스 만들기
fetch 함수를 사용할 때 next 객체 tags에 태그들을 지정해서 넣는 것으로 배웠습니다. 제가 이해하기로는 그 태그들로 분류되어 next가 캐싱하는 걸로 알고 있는데, 브라우저 쪽에서 작동하는 fetch(예를 들어 onclick에 붙어있는 fetch라든지... )와 next 서버 쪽에서 작동하는 fetch(예를 들어 api 디렉토리의 routes.ts에서 동작하는...)의 태그가 같다면 캐시 공유가 되나요? 브라우저는 브라우저 쪽에 서버 쪽 fetch는 서버 쪽에 저장될 것 같은데 어떻게 동작하는지 질문드립니다.
해결됨
Next + React Query로 SNS 서비스 만들기
tanstack query와 next.js 를 함께 사용하면서 의문이 들어 질문합니다! 강의의 코드를 보니 같이 prefetch를 해도 유저데이터는 useQueryClient를 사용해서 데이터를 재사용하는듯한데 안에 하위 컴포넌트의 경우 prefetch를하고 useQuery를 사용해서 데이터를 가져오는듯 하더라구요 이 경우도 데이터를 재사용하는건가요? 아니면 새로 가져오는건가요? 그렇다면 똑같이 데이터를 prefetch해도 useQueryClient를 사용해서 가져오는것과 useQuery를 사용해서 가져와야하는 기준이 있을까요? (저의경우 프로젝트 전체를 prefetch후 useQueryClient를해서 데이터를 가져왔더니 데이터를 가져옴과 동시에 fresh가아니라 inactive상태가 되더라구요. ) 좋은강의 감사합니다. 벚꽃같은 제로초 화이팅