inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

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

에러, 로딩 내용 페이지를 모든 페이지에 다 만드는 이유가 따로 있나요?

미해결

기초부터 배우는 Next YTMusic 클론 코딩 (with next.js 14, UI 마스터)

에러나 로딩을 전역적으로 상태로 봐서 에러나 로딩을 띄우는게 아닌, 페이지별로 전부 다 복붙으로 넣는 이유가 따로 있나요..? 일단 따라해보고있긴 한데, 뭔가 좀 아닌것 같아서 질문 드립니다ㅠㅜ

  • react
  • 인터랙티브-웹
  • 클론코딩
  • next.js
  • tailwindcss
  • zustand
Junho 댓글 3 좋아요 2 조회수 245

eslint.config.js (flat config): eslint.config.js 파일에서 eslint-config-prettier를 import한 후, 다른 설정을 재정의할 수 있도록 설정 배열의 마지막에 추가합니다.

미해결

React 완벽 마스터: 기초 개념부터 린캔버스 프로젝트까지

eslint.config.js (flat config): eslint.config.js 파일에서 eslint-config-prettier 를 import한 후, 다른 설정을 재정의할 수 있도록 설정 배열의 마지막에 추가합니다. 에서 어떻게 import해야하는가요? import eslint-config-prettier from 'eslint-config-prettier'; 로 하면 오류가 납니다.

  • react
  • React-Context
  • react-router
  • tailwindcss
  • react-query
수달고니 댓글 4 좋아요 0 조회수 279

.prettierrc를 적용했는데 저장하니 ;이 왜 안생길까요?

미해결

React 완벽 마스터: 기초 개념부터 린캔버스 프로젝트까지

.prettierrc를 적용했는데 저장하니 ;이 왜 안생길까요?

  • react
  • React-Context
  • react-router
  • tailwindcss
  • react-query
수달고니 댓글 2 좋아요 1 조회수 157

[질문 x 공유용] tailwind v4.0 으로 강의랑 다를 때 (import 다름, tailwind.config.js 없어짐 등)

미해결

실무에 바로 적용하는 스토리북과 UI 테스트

강의랑 다른 부분 1. tailwind 설치 커맨드 : 커맨드가 간단해졌어요. npm install tailwindcss @tailwindcss/vite 강의랑 다른 부분 2. vite.config.ts : 이제 ***.tsx, ***.jsx 를 일일히 넣지 않아도 됩니다. import { defineConfig } from 'vite' import tailwindcss from '@tailwindcss/vite' export default defineConfig({ plugins: [ tailwindcss(), ], }) 강의랑 다른 부분 3. @import ~ 3줄 @import "tailwindcss"; 한 줄로 초간단해짐.. 강의랑 다른 부분 4. tailwind.config.js : config.js 가 없어졌습니다. (자세한 내용: https://tailwindcss.com/blog/tailwindcss-v4#css-first-configuration ) 대신 index.css 에 아래와 같은 형식으로 theme 을 적용할 수 있습니다. @import 'tailwindcss'; @theme { --color-primary: #1d2745; --color-secondary: #1de5d4; --color-tertiary: #1d2745; --color-white: #ffffff; --color-mono100: #f1f1f1; --color-mono200: #bebebe; --color-mono300: #d6d7d9; --color-error: #d01e1e; --color-social: #395997; }

  • react
  • typescript
  • tailwindcss
  • storybook
  • ui-testing
윤삼삼 댓글 2 좋아요 6 조회수 558

nested 리스트일때 <ul> bullet 스타일 바꾸는 방법

미해결

TailwindCSS 완벽 마스터: 포트폴리오부터 어드민까지!

안녕하세요 강사님 typescript next 환경에서 포트폴리오를 만들고 있는데요 위 사진처럼 nested list 구조 일때 불릿 스타일이 변하지 않습니다. tailwind.config.ts 에서 기본 ul 태그 스타일을 수정해볼까 하는데 ul { list-style-type: disc; } ul ul { list-style-type: circle; } ul ul ul { list-style-type: square; } 이런식(?)으로요 특정 요소만 기본 css 를 사용하고 싶거나 위 처럼 tailwind 스타일을 커스텀하고 싶을때 어떻게 하면될까요?

  • tailwindcss
  • typescript
  • css
권솔 댓글 2 좋아요 0 조회수 258

반응형 레이아웃 문의 드려요.

미해결

Tailwind CSS로 만드는 멋진 웹 UI 스타일링

죄송하지만 질문하실 때 React 또는 Vue와 같은 자바스크립트 프레임워크에서 Tailwind CSS 설치 및 사용에 관한 질문은 하지 말아주세요. 질문하셔도 React 또는 Vue 환경을 몰라서 답변을 드릴 수가 없습니다. 오직 순수한 Tailwind CSS 관련 질문과 CSS 속성 및 활용에 관한 질문만 해주시면 감사드리겠습니다. 강의명 : 반응형 레이아웃 - Responsive Design Container 과 Responsive Design 차이가 아래가 맞을까여? Container: 전체적으로 반응형으로 설정 Responsive Design : 선언한 엘리먼트 기으로 (국소적으로) 레이아웃을 세세하게 컨트롤 한다

  • HTML/CSS
  • 반응형-웹
  • tailwindcss
아무도_모를_아이디 댓글 2 좋아요 1 조회수 190

vscode에서 @material-tailwind/react component를 가져왔을 때 뜨는 빨간줄 제거할 수는 없나요?

해결됨

[풀스택 완성] Supabase로 웹사이트 3개 클론하기 (Next.js 14)

✅ 모든 질문들은 슬랙 채널에서 답변드리고 있습니다. 💡 ”로펀의 인프런 상담소” 슬랙 채널 가입하기 💡 평일중에는 퇴근 이후(저녁 7시)에 답변을 받아보실 수 있고, 주말중에는 상시 답변드리고 있습니다. 안녕하세요? 질 좋은 강의 잘 듣고 있습니다. 코드를 치면서 신경쓰이는 부분이 있어서 질문드립니다. vscode에서 @material-tailwind/react component를 가져왔을 때 뜨는 빨간줄 없앨 수는 없나요?

  • next.js
  • tailwindcss
  • supabase
김민교 댓글 2 좋아요 0 조회수 363

메인 폰트 사용법이 궁금합니다.

미해결

Tailwind CSS로 만드는 멋진 웹 UI 스타일링

4.0 기준으로 학습하고 있습니다. input.css 파일을 아래와 같이 작성하면 자동으로 Montserrat 폰트 즉 첫번째 줄 폰트가 적용되는건가요? 메인 폰트 적용 방법을 모르겠습니다. @theme { --font-mont: "Montserrat", "sans-serif"; --font-noto: "Noto Sans KR", "Arial", "sans-serif"; /* Color */ --color-deepgreen:#6ab04c; --color-deeporange:#f0932b; }

  • HTML/CSS
  • 반응형-웹
  • tailwindcss
좀 해 댓글 2 좋아요 1 조회수 244

searchMovies에서 hasNextPage가 필요한 이유

해결됨

[풀스택 완성] Supabase로 웹사이트 3개 클론하기 (Next.js 14)

안녕하세요 로펀님. 강의 잘 듣고 있습니다. useInfiniteQuery에서 반환하는 hasNextPage를 이용해 fetchNextPage를 하는데 searchMovies에서 작성한 const hasNextPage = count > page * pageSize 는 사용하지 않는 것 같아서 질문 올립니다! {data?.pages ?.map((page) => page.data) ?.flat() ?.map((movie) => ( <MovieCard key={movie.id} movie={movie} /> ))} 에서도 searchMovies 에서 반환하는 page, pageSize, hasNextPage를 제외하고 data만 쓰시길래 작성하신 이유가 궁금합니다. useInfiniteQuery에서 반환하는 hasNextPage와는 다른 건가요??

  • firebase
  • next.js
  • tailwindcss
  • react-query
  • supabase
banayj0909 댓글 2 좋아요 0 조회수 172

Counter 컴포넌트 전부 리렌더링 되는 현상

미해결

React 완벽 마스터: 기초 개념부터 린캔버스 프로젝트까지

<Counter onTotal={handleTotal} /> <hr/> <Counter onTotal={handleTotal}/> <hr/> <Counter onTotal={handleTotal}/> 여기서 Counter.jsx에서 console.log 를 추가했고 버튼 세 개 중 하나만 눌러도 <Counter /> 세 개 전체가 리렌더링 됩니다. (log 가 세번찍힘) 왜그런건가요 ?

  • react
  • React-Context
  • react-router
  • tailwindcss
  • react-query
rookiezin 댓글 2 좋아요 0 조회수 158

쿠폰 문의

해결됨

[풀스택 입문] Firebase보다 10배 좋은 Supabase

[풀스택 완성] Supabase로 웹사이트 3개 클론하기 (Next.js 14) 할인 쿠폰코드를 적용하려니까 신규 발급이 제한되었거나 발급 수량이 초과된 쿠폰이라고 하네요 ㅠ

  • postgresql
  • next.js
  • tailwindcss
  • supabase
밀당이 댓글 2 좋아요 0 조회수 278

npx create-react-app cra-react-app 실행시 에러가 발생합니다.

미해결

React 완벽 마스터: 기초 개념부터 린캔버스 프로젝트까지

뭔가 잘 모르겠는데.. 아래 확인 부탁드려도 될까요? 설정한것도 없는것 같은데 기본 생성 명령어자체가 실행이 안된다니..ㅠㅠㅠㅠ manijang2@gimseonman-ui-MacBookAir VSProjects % npx create-react-app cra-react-app Creating a new React app in /Users/manijang2/VSProjects/cra-react-app. Installing packages. This might take a couple of minutes. Installing react, react-dom, and react-scripts with cra-template... added 1324 packages in 40s 268 packages are looking for funding run `npm fund` for details Initialized a git repository. Installing template dependencies using npm... npm error code ERESOLVE npm error ERESOLVE unable to resolve dependency tree npm error npm error While resolving: cra-react-app@0.1.0 npm error Found: react@19.0.0 npm error node_modules/react npm error react@"^19.0.0" from the root project npm error npm error Could not resolve dependency: npm error peer react@"^18.0.0" from @testing-library/react@13.4.0 npm error node_modules/@testing-library/react npm error @testing-library/react@"^13.0.0" from the root project npm error npm error Fix the upstream dependency conflict, or retry npm error this command with --force or --legacy-peer-deps npm error to accept an incorrect (and potentially broken) dependency resolution. npm error npm error npm error For a full report see: npm error /Users/manijang2/.npm/_logs/2025-02-03T13_23_36_276Z-eresolve-report.txt npm error A complete log of this run can be found in: /Users/manijang2/.npm/_logs/2025-02-03T13_23_36_276Z-debug-0.log `npm install --no-audit --save @testing-library/jest-dom@^5.14.1 @testing-library/react@^13.0.0 @testing-library/user-event@^13.2.1 web-vitals@^2.1.0` failed manijang2@gimseonman-ui-MacBookAir VSProjects %

  • react
  • React-Context
  • react-router
  • tailwindcss
  • react-query
김선만 댓글 3 좋아요 1 조회수 350

react 19버전에서는 recoil사용이 어렵나요?

해결됨

[풀스택 완성] Supabase로 웹사이트 3개 클론하기 (Next.js 14)

✅ 모든 질문들은 슬랙 채널에서 답변드리고 있습니다. 💡 ”로펀의 인프런 상담소” 슬랙 채널 가입하기 💡 평일중에는 퇴근 이후(저녁 7시)에 답변을 받아보실 수 있고, 주말중에는 상시 답변드리고 있습니다. 안녕하세요. recoil 강의 부분에서 하나의 에러로 인해서 진행이 막힌 상태입니다! TypeError: Cannot destructure property 'ReactCurrentDispatcher' of ' {imported module [project]/nodemodules/next/dist/compiled/react/index.js [app-client] (ecmascript)} .default.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED' as it is undefined. "dependencies": { "next": "15.1.6", "react": "^19.0.0", "react-dom": "^19.0.0", "recoil": "^0.7.7" }, next 15 & react 19 버전으로 진행중이었는데 구글링을 해보아도 다들 더이상 recoi은 사용하지말라 이런 답만 알려주고있어 해결하기가 어려운 상태네요. 결국 버전문제인 것 같은데, 최신 버전으로 해당 문제가 해결이 어렵다면 다른 상태관리 라이브러리를 사용하며 진행하고싶은데요, Zustand 라이브러리를 사용해도 진행에 무리없을까요?

  • firebase
  • next.js
  • tailwindcss
  • react-query
  • supabase
댓글 2 좋아요 0 조회수 1567

빨간 밑줄 질문이요..

미해결

React 완벽 마스터: 기초 개념부터 린캔버스 프로젝트까지

위와 같이 해당 변수나 값을 선언한거를 사용하지 않으면 이렇게 빨간 밑줄이 생기는데요. 이거 없앨수 없나요? 거슬리네요..ㅠ

  • react
  • React-Context
  • react-router
  • tailwindcss
  • react-query
eventures111 댓글 2 좋아요 0 조회수 186

조건부 렌더링에서 로직 처리 차이

미해결

React 완벽 마스터: 기초 개념부터 린캔버스 프로젝트까지

export default function CourseItem({title, description, thumbnail, isFavorite}) { let defaultIconTag = "/img/heart/heart-icon.svg" if (isFavorite) { defaultIconTag = "/img/heart/heart-fill-icon.svg" } return ( <article className="course"> <img className="course__img" src={thumbnail} alt="강의 이미지"/> <div className="course__body"> <div className="course__title">{title}</div> <div className="course__description">{description}</div> </div> <div className="course__icons"> <button className="btn"> <img className="icon-heart" src={defaultIconTag} /> </button> </div> </article> ); } 저는 기존 CourseItem메서드 내에서 변수를 생성해서 만들었는데 강의에서는 새로운 메서드를 생성해서 진행하더라고요. 메서드를 따로 생성해서 버튼 태그랑 묶어서 같이 넘기신 이유가 있나요? 현업에서 어떤 방식을 더 선호할까요?

  • react
  • React-Context
  • react-router
  • tailwindcss
  • react-query
wofjeiong2ewg23 댓글 1 좋아요 0 조회수 167

loading이 동작하지 않습니다.

해결됨

Next.js App router 기반 Chat GPT 만들기

https://github.com/JeanYoungPark/next-chat-gpt loading 부분 코드 작성중인데 loading 컴포넌트가 따로 로드되지 않는 것 같습니다. 원인을 알 수 있을까요?

  • react
  • typescript
  • next.js
  • tailwindcss
  • zustand
  • chatgpt
박진영 댓글 2 좋아요 0 조회수 273

via.placeholder.com 오류

미해결

TailwindCSS 완벽 마스터: 포트폴리오부터 어드민까지!

via.placeholder.com 가 더이상 없어서 인터넷 찾아보니 https://placehold.co/ 여기가 되더라구요 그래서 <div class="grid grid-cols-3 gap-4"> <img src="https://placehold.co/400x400.png?text=City" alt="City Image" class="w-full h-full rounded-lg shadow-md" /> <img src="https://placehold.co/400x400.png?text=Landscape" alt="Landscape Image" class="w-full h-full rounded-lg shadow-md" /> <img src="https://placehold.co/400x400.png?text=Mountain" alt="Mountain Image" class="w-full h-full rounded-lg shadow-md" /> <img src="https://placehold.co/400x400.png?text=River" alt="River Image" class="w-full h-full rounded-lg shadow-md" /> <img src="https://placehold.co/400x400.png?text=Forest" alt="Forest Image" class="w-full h-full rounded-lg shadow-md" /> <img src="https://placehold.co/400x400.png?text=Ocean" alt="Ocean Image" class="w-full h-full rounded-lg shadow-md" /> <img src="https://placehold.co/400x400.png?text=Desert" alt="Desert Image" class="w-full h-full rounded-lg shadow-md" /> <img src="https://placehold.co/400x400.png?text=Waterfall" alt="Waterfall Image" class="w-full h-full rounded-lg shadow-md" /> <img src="https://placehold.co/400x400.png?text=Beach" alt="Beach Image" class="w-full h-full rounded-lg shadow-md" /> </div> 이렇게 주소 설정하니 잘 됩니다.

  • HTML/CSS
  • javascript
  • 반응형-웹
  • tailwindcss
김명원 댓글 2 좋아요 0 조회수 926

axios post 사용할때 페이지 새로고침 문제

미해결

React 완벽 마스터: 기초 개념부터 린캔버스 프로젝트까지

Home.jsx 이렇게 하고 import { useEffect, useState } from 'react'; import HomeDataLength from '../components/HomeDataLength.jsx'; import HomeSearch from '../components/HomeSearch.jsx'; import CanvasItemList from '../components/CanvasItemList.jsx'; import SearchBar from '../components/SearchBar.jsx'; import GridFlexBTN from '../components/GridFlexBTN.jsx'; import { deleteHome, createHome, getHome } from '../api/home.js'; import { v4 as uuid } from 'uuid'; import dayjs from 'dayjs'; export default function Home() { const [isGrid, setIsGrid] = useState(true); const [search, setSearch] = useState(''); const [data, setData] = useState([]); const [isLoading, setIsLoading] = useState(false); const [error, setError] = useState(false); useEffect(() => { const api = async () => { setIsLoading(true); setError(false); try { const response = await getHome(''); setData(response.data); } catch (err) { setError(err); } finally { setIsLoading(false); } }; api(); }, []); const [isLoadingCreate, setIsLoadingCreate] = useState(false); const [createError, setCreateError] = useState(false); // 등록버튼 누르면 새로운 데이터 저장 const handleNewCreate = async () => { // setIsLoadingCreate(true); // setCreateError(false); // try { const id = uuid(); const newCreate = { id, date: dayjs().format('YYYY-MM-DD HH:mm:ss'), text: `${id.substring(0, 4)}-테스트`, category: '테스트', }; await createHome(newCreate); console.log(123); // const res = await getHome(); // setData(res.data); // } catch (err) { // setCreateError(err); // console.log(createError, 'createError'); // } finally { // setIsLoadingCreate(false); // } }; const handleText = text => { const searchData = data.filter(d => d.text.toLowerCase().includes(text.toLowerCase()), ); if (searchData.length === 0) { setSearch(null); } else { setSearch(searchData); } }; const handleDelete = async id => { // const newData = data.filter(d => d.id !== id); // setData(newData); await deleteHome(id); }; return ( <> <> <div className="flex flex-col md:flex-row justify-between items-center"> <button className="hover:bg-blue-400 bg-blue-500 text-white rounded-md text-bold p-3" onClick={handleNewCreate} > 등록하기 </button> {isLoadingCreate && <p>등록중</p>} {createError && <p>{createError}</p>} <SearchBar handleText={handleText} /> <GridFlexBTN setIsGrid={setIsGrid} isGrid={isGrid} /> </div> <HomeDataLength data={data} error={error} isLoading={isLoading} /> <HomeSearch search={search} /> {!isLoading && !error && ( <CanvasItemList data={data || []} search={search} isGrid={isGrid} handleDelete={handleDelete} /> )} </> </> ); } home.js 파일은 아래와 같은 상태이면 import { home } from './http'; // 목록 조회 export const getHome = () => { return home.get('/'); }; // 등록 export const createHome = newCreate => { try { console.log('ㅅㅣ작'); } catch (error) { console.log('에러'); } finally { console.log('종료'); } // debugger; return home.post('/', newCreate); }; // 수정 // 삭제 export const deleteHome = id => { return home.post('/', id); }; db는 server-json을 사용하고 있습니다. 그런데 get 요청을 할때는 잘 작동하는데 post로 등록하거나 삭제할때는 db에 정상 등록, 삭제되는데 화면이 새로고침이 되버리는 상태입니다. Home.jsx 화면이 리렌더링이 되도록 하고싶은데 새로고침은 왜 그런지 모르겠습니다. postman으로도 post로 db에 저장했는데 리액트 화면이 자동으로 새로고침 되버립니다. 구글링도 해봤는데 해결이 안되서 문의드립니다. 혹시나 해서 db.json이 변경되면 화면도 변경될까 싶어서 을 db.json --watch로만 해보고 --watch도 없애봤는데 안됩니다. const handleNewCreate = async () => { console.log('시작1'); const id = uuid(); const newCreate = { id, date: dayjs().format('YYYY-MM-DD HH:mm:ss'), text: `${id.substring(0, 4)}-테스트`, category: '테스트', }; const data = await createHome(newCreate); console.log(data, 'data'); console.log('시작2'); debugger; }; debugger를 사용했을때 이렇게 데이터 나오는데 디버거 끄는 순간 바로 화면이 새로고침 되고 있습니다. 그리고 콘솔창도 새창으로 이전 내역이 다 사라지는 상태입니다.

  • react
  • React-Context
  • react-router
  • tailwindcss
  • react-query
밈몀묘 댓글 2 좋아요 0 조회수 269

인기 태그

인프런 TOP Writers

주간 인기글