묻고 답해요
161만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결한 입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지
section 12 폴더를 만드는 부분이 강의에 나와있지 않아요
section 12 폴더 내의 파일 구성은 어떻게 해야 하나요?
-
해결됨한 입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지
원시타입 vs 객체타입 부분 질문있습니다.
안녕하세요 원시타입과 객체타입 강의를 보다가 궁금한점이 생겨 질문을 드립니다. let p1 = 1;let p2 = p1;p2 = 2;이렇게 1에서 2로 재할당을 하면 메모리상에는 원래 1이 있었는데 새로운 메모리에 2가 추가가 되면서 해당 공간을 가리키는데 메모리 공간에 저장되어 있던 1은 수정되지 않는다...라고 이해하고 있습니다. 그럼 여기서 1은 수정만 되지 않을 뿐 없어지지 않고 그대로 1이 저장이 되어있는건가요? 그리고 객체타입에서는 값을 변경하면 원본이 바로 변경되므로 안전하게 ... 스프레드로 값을 복사해서 사용한다라는 설명이 맞나요?
-
해결됨한 입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지
Async와 await에 대해 질문있습니다.
안녕하세요 강의 너무 잘 보고 있습니다. 강의를 듣다가 Async와 await에 대해 질문이 있습니다.api요청과 같이 시간이 걸리는 작업은 비동기로 이루어지기 때문에 다른 작업이 먼저 이루어지고 그다음 데이터가 불러오면 그 작업을 해야되므로 비동기로 만들어 주기 위해 async를 붙인다 까지는 이해가 되는데 await은 비동기 작업까지 다 처리되고 결과값을 얻기 위해 사용이 되는건가요? 마지막으로 async는 함수 앞에 작성이 되는데 await은 어디에 작성이 되는것인지 궁금합니다.
-
미해결실무에 바로 적용하는 프런트엔드 테스트 - 1부. 테스트 기초: 단위・통합 테스트
debounce 함수 테스트 정확도 관련 질문입니다.
안녕하세요. debounce 함수 테스트 관련 강의를 보고 궁금한 점이 있어 문의드립니다. debouncedFn이 300ms이 지난 후 실행되어야 함을 테스트할 때, 기존에 작성해주신 것 처럼 테스트할 시에는 함수가 300ms 후가 아닌 즉시 실행이 되거나 그보다 작은 시간이 지나고 실행이 되어도 테스트가 통과하게 됩니다. 그에 따라 아래처럼 작성하는 것이 더 정확한 테스트라고 생각이 되는데 이렇게 테스트하지 않는 이유가 있는지 궁금합니다! it('특정 시간이 지난 후 함수가 호출된다.', () => { const spy = vi.fn(); const debouncedFn = debounce(spy, 300); debouncedFn(); expect(spy).not.toHaveBeenCalled(); // 즉시 호출되지 않았는지 확인 vi.advanceTimersByTime(299); expect(spy).not.toHaveBeenCalled(); // 299ms 후에도 호출되지 않았는지 확인 vi.advanceTimersByTime(1); expect(spy).toHaveBeenCalledTimes(1); // 300ms 후에 정확히 한 번 호출되었는지 확인 expect(spy).toHaveBeenCalled(); });
-
미해결처음 만난 리액트(React)
jsx 실습 관련 오류 npm start를 해도 강사 화면처럼 안떠요.
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요.왼쪽의 화면처럼만 뜹니다.그리고 강사처럼 npm start만 하면 이런 오류가 떠서cd my-app , npm start하면 그나마 실행되는데 위의 사진처럼 결과 리액트가 아니라 로딩화면같이 뜹니다. 어떻게 해결해야하나요?
-
미해결처음 만난 리액트(React)
terminal에서 npx 명령어 입력해도 안떠요..
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요.어떻게 해결해야할까요?
-
미해결SCSS(SASS)+FLEX 실전 반응형 웹 프로젝트 with Figma
수강평 작성이 안되네요..
안녕하세요 선생님SCSS(SASS)+FLEX 실전 반응형 웹 프로젝트 with Figma 강의를구매하고 섹션1all 과 섹션2 몇개 강의 듣고 수강평 남기려고 하는데 작성하는 곳이 없어서 글올립니다..ㄴ 수강평 버튼이 없습니다..
-
해결됨[2025] 비전공자도 가능한 React Native 앱 개발 마스터클래스
섹션7. 4강 5분 57초부터 api.json
말씀하신 것을 어떻게 해야 할지 모르겠습니다.api.json 파일을 생성했는데, 이곳에 어떤 데이터를 넣으면 될까요??아래 링크 주신 것들을 하나하나 넣어봤는데, 되지는 않았습니다. ㅠㅠ
-
미해결[코드팩토리] [초급] NestJS REST API 백엔드 완전 정복 마스터 클래스 - NestJS Core
one to many mapping에 관하여
oneToMany mapping와 manyToOne mapping에서 users.tntity.ts에 있는 posts항목에 의문이 생겨 질문 드립니다. PostModel list로 되어있는데 DB table은 2dimension이 되지 않는다고 하신것 같아서요 혹시 내부는 어떻게 구현이 되어 있는지 알 수 있나요
-
해결됨한 입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지
컨텍스트와 프로퍼티 선택 기준
안녕하세요 강의 잘 보고 있습니다. 컨텍스트도 많이 사용하면 성능 저하가 생길 것으로 예상됩니다. 그래서 컨텍스트와 프로퍼티 선택 기준이 궁금한데,실무에선 보통 프로퍼티로 우선 사용하고 하위 컴포넌트들이 특정 개수 이상이 되면 컨텍스트로 변경을 하나요?아니면 처음부터 컨텍스트로 정의해 놓고 불필요한 컨텍스트를 프로퍼티로 변경하나요? 감사합니다
-
해결됨[2025] 비전공자도 가능한 React Native 앱 개발 마스터클래스
섹션5. 날씨 앱 expo 버전
확실히 expo 버전으로 프로젝트를 생성하면, 영상처럼 진행이 되지 않습니다 ㅠㅠ 프로젝트 설치 및 실행 과정은 다음과 같습니다.기종: Androidnpx create-expo-app <앱 이름> --template세 번째(blank) :typescript 선택npx expo start를 실행expo 앱에서 QR 코드로 보기강의와 달리, expo로 빌드하셨다면npx expo install expo-location를 설치해주신 다음에 useEffect 함수 부분을 다음과 같이 변경해주면 됩니다.(Expo는 자체 위치 서비스 API를 제공하므로, @react-native-community/geolocation 대신 expo-location을 사용해야 합니다.)useEffect(() => { const getLocation = async () => { try { // 위치 권한 요청 let { status } = await Location.requestForegroundPermissionsAsync(); if (status !== 'granted') { setError('위치 권한이 거부되었습니다'); setLoading(false); return; } // 현재 위치 가져오기 let location = await Location.getCurrentPositionAsync({}); const { latitude, longitude } = location.coords; fetchWeather(latitude, longitude); } catch (err) { setError(err.message); setLoading(false); } }; getLocation(); }, []);다음으로 OpenWeatherMap API는 기본적으로 켈빈 온도를 반환합니다. 따라서 섭씨로 변환하는 코드를 추가해야 합니다.각자 가져오신 API 값 뒤에 &units=metirc 를 추가해주시면 됩니다. 전체 코드는 다음과 같습니다.import { StatusBar } from 'expo-status-bar'; import { useEffect, useState } from 'react'; import { ActivityIndicator, Text, View } from 'react-native'; import styled from 'styled-components/native'; import * as Location from 'expo-location'; const Container = styled.View` align-items: center; margin-top: 40px; background-color: #222222; flex: 1; `; const MainTemp = styled.Text` font-size: 80px; color: white; `; const Addition = styled.View` background-color: #aeaeae; width: 150px; height: 150px; margin: 15px; align-items: center; justify-content: center; border-radius: 15px; `; const App = () => { const [weatherData, setWeatherData] = useState(null); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); useEffect(() => { const getLocation = async () => { try { // 위치 권한 요청 let { status } = await Location.requestForegroundPermissionsAsync(); if (status !== 'granted') { setError('위치 권한이 거부되었습니다'); setLoading(false); return; } let location = await Location.getCurrentPositionAsync({}); const { latitude, longitude } = location.coords; fetchWeather(latitude, longitude); } catch (err) { setError(err.message); setLoading(false); } }; getLocation(); }, []); const fetchWeather = async (latitude, longitude) => { try { const response = await fetch( `https://api.openweathermap.org/data/2.5/weather?lat=${latitude}&lon=${longitude}&appid=<<개인 API값>>&units=metric` ); // <<>>는 지우셔야 합니다. if (!response.ok) { throw new Error('Network response was not ok'); } const data = await response.json(); setWeatherData(data); } catch (error) { setError(error.message); } finally { setLoading(false); } }; if (loading) { return ( <Container> <ActivityIndicator size="large" color="#ffffff" /> </Container> ); } if (error) { return ( <Container> <Text style={{ color: 'white', fontSize: 20 }} >{`Error: ${error}`}</Text> </Container> ); } if (!weatherData) { return ( <Container> <Text style={{ color: 'white', fontSize: 20 }}>No data available</Text> </Container> ); } const { main: { temp, feels_like, humidity, temp_max, temp_min }, wind: { speed }, weather, } = weatherData; return ( <Container> <StatusBar /> <Text style={{ fontSize: 20, marginTop: 40, color: 'white' }}> {weatherData.name} </Text> <MainTemp>{Math.round(temp)}℃</MainTemp> <Text style={{ fontSize: 24, color: 'white' }}>{weather[0].main}</Text> <View style={{ flexDirection: 'row' }}> <Addition> <Text style={{ color: 'white', fontSize: 20, marginTop: -40, marginBottom: 30, }} > 체감 온도 </Text> <Text style={{ color: 'white', fontSize: 18 }}> {Math.round(feels_like)}℃ </Text> </Addition> <Addition> <Text style={{ color: 'white', fontSize: 20, marginTop: -40, marginBottom: 30, }} > 습도 </Text> <Text style={{ color: 'white', fontSize: 18 }}>{humidity}%</Text> </Addition> </View> <View style={{ flexDirection: 'row' }}> <Addition> <Text style={{ color: 'white', fontSize: 20, marginTop: -40, marginBottom: 30, }} > 최고/최저 온도 </Text> <Text style={{ color: 'white', fontSize: 18 }}> {Math.round(temp_max)}℃/{Math.round(temp_min)}℃ </Text> </Addition> <Addition> <Text style={{ color: 'white', fontSize: 20, marginTop: -40, marginBottom: 30, }} > 풍속 </Text> <Text style={{ color: 'white', fontSize: 18 }}>{speed} m/s</Text> </Addition> </View> <View></View> </Container> ); }; export default App;
-
미해결[코드팩토리] [초급] NestJS REST API 백엔드 완전 정복 마스터 클래스 - NestJS Core
BearerTokenGuard 구현해보기
코드팩토리 디스코드에 질문하면 더욱 빠르게 질문을 받아 볼 수 있습니다![코드팩토리 디스코드]https://bit.ly/3HzRzUM 토큰이 없다고 듭니다. 토큰값이 담기는건 확인되는데포스트맨 authorization : Bearer refreshToken 넣어보면 토큰이 없습니다. 401 떠서 다시 계속 해보는데 못찾겠습니다.
-
해결됨[2025] 비전공자도 가능한 React Native 앱 개발 마스터클래스
섹션4. 번역기 앱 expo 버전?!
계산기 앱 개발과 마찬가지로, 다음과 같은 프로젝트 설치 및 실행을 진행하였습니다.<기종 : Android>npx create-expo-app <앱 이름> --template세 번째(blank) :typescript 선택npx expo start를 실행expo 앱에서 QR 코드로 보기이전 강의(레이아웃 구성하기)의 중간(7:23)에 나오는 텍스트 창을 클릭하면 UI가 따라 올라가는 것을 방지하기 위한 설정방법이 제 것에서는 나타나지 않았습니다. 검색 창에 windowsoftinputmode 또는 AndroidManifest를 검색해도 나타나지 않았습니다.(아무래도, 제가 설치를 잘못해서 나타났거나 expo로 빌드했기에 나타나지 않는 것 같습니다. VSCode는 기존에 사용했던 터라 해당되지 않는 것 같습니다.) 이를 해결하기 위해,Picker를 감싸고 있는 View를 Wrapper라고 이름을 변경한 후에, postion: absolute 속성을 부여했습니다. +) 텍스트 입력 글자가 꽤 길어지면, 줄바꿈이 되지 않고 글자가 잘려나가는 현상이 있습니다. 이를 해결하는 방법으로는 multiline={true}를 추가해주면 됩니다.코드는 아래와 같습니다.import { StatusBar } from 'expo-status-bar'; import React, { useState } from 'react'; import { Text, TextInput, View, Dimensions } from 'react-native'; import Translator from 'react-native-translator'; import styled from 'styled-components/native'; import { Picker } from '@react-native-picker/picker'; const Container = styled.View` background-color: #181818; flex: 1; padding-top: 20px; `; const Wrapper = styled.View` position: absolute; top: 40px; left: 0; right: 0; padding-horizontal: 10px; `; const InputView = styled.View` background-color: #606060; height: 250px; justify-content: left; align-items: start; padding: 10px; border-radius: 10px; margin-bottom: 80px; `; const ResultView = styled(InputView)` background-color: #0084ff; margin-bottom: 10px; `; const App = () => { const [value, setValue] = useState(''); const [result, setResult] = useState(''); const [fromLang, setFromLang] = useState('en'); const [toLang, setToLang] = useState('ko'); return ( <Container> <StatusBar style="light" /> <Translator from={fromLang} to={toLang} value={value} onTranslated={(t) => setResult(t)} /> <Wrapper> <Picker style={{ marginBottom: 10, backgroundColor: '#606060' }} selectedValue={fromLang} onValueChange={(itemValue) => setFromLang(itemValue)} > <Picker.Item label="한국어" value="ko" /> </Picker> <InputView> <TextInput style={{ fontSize: 24, color: 'white' }} value={value} onChangeText={(t) => setValue(t)} multiline={true} placeholder="번역할 텍스트 입력" /> </InputView> <Picker style={{ marginBottom: 10, backgroundColor: '#0084ff' }} selectedValue={toLang} onValueChange={(itemValue) => setToLang(itemValue)} > <Picker.Item label="영어" value="en" /> </Picker> <ResultView> <Text style={{ fontSize: 24, color: 'white' }}>{result}</Text> </ResultView> </Wrapper> </Container> ); }; export default App; ps) 간혹 글자를 입력하면 즉각 번역되지 않고, 번역되는 아래쪽 Picker를 클릭한 후에야 동작하긴 합니다. 이를 해결하기 위해서는 useEffect를 사용하면 해결되지만 강의에서는 다루지 않아 코드에 반영하지 않았습니다. GPT가 잘 알려주니까 궁금하신 분들은 해보시면 좋을 것 같습니다~ ps) 업데이트 하시면서, 영상이 잘못배치된 것 같습니다~ 번역앱 원리와 이해 부분에 코인에 관한 영상이 재생됩니다. 코인 관련, 날씨앱에서는 이상이 없었습니다~ 좋은 강의 감사합니다~!! 덕분에 많은 도움이 되고 있습니다.
-
해결됨이거 하나로 종결-스프링 기반 풀스택 웹 개발 무료 강의
다운로드 불가
1강 소개 자료 zip 파일이 압축 해제가 안 됩니다!
-
해결됨[2025] 비전공자도 가능한 React Native 앱 개발 마스터클래스
계산기 앱 착오를 거친 수정버전
제가 설치를 이상하게 했는지, 잘 되지 않아 저는 프로젝트 생성을 다음과 같은 절차로 진행했습니다.npx create-expo-app <앱 이름> --template세 번째(blank) :typescript 선택npx expo start를 실행expo 앱에서 QR 코드로 보기위와 같은 절차를 거쳐, 복붙으로도 진행해봤을 때의 문제점은 안드로이드 기준으로 기호들이 나타나지 않는다는 점이었습니다. 무지성으로 복붙한 것이 문제였는데요. 문제는 margin 값들의 값이 컸기 때문이었습니다. 혹시 저 같이 잘 안 되시는 분들이 있을까 하여, 좀 헤맸던 기록으로 남깁니다~ ps. 아래 별도로 올려주신 코드 중에 const [result, setResult] = useState('') 에서 useState('0')으로 변경이 필요합니다. 그리고 알려주신 코드를 복붙해서 했을 때 제대로 나오지 않아, GPT의 도움을 받아 수정해보았습니다.import React, { useState } from 'react'; import { Text, View } from 'react-native'; import MaterialIcons from 'react-native-vector-icons/MaterialIcons'; import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons'; import Entypo from 'react-native-vector-icons/Entypo'; import FontAwesome6 from 'react-native-vector-icons/FontAwesome6'; import styled from 'styled-components/native'; import { evaluate } from 'mathjs'; const NumberButton = styled.TouchableOpacity` background-color: #b6b6b6; width: 65px; height: 65px; border-radius: 35px; margin: 8px; align-items: center; justify-content: center; `; const OperatorButton = styled(NumberButton)` background-color: #0084ff; `; const NumberText = styled.Text` font-size: 30px; color: white; `; const ResultText = styled.Text` font-size: 65px; padding: 20px; margin-top: 50px; color: white; text-align: right; `; const App = () => { const [input, setInput] = useState(''); const [result, setResult] = useState('0'); const handlePress = (value) => { const newInput = input + value; setInput(newInput); setResult(newInput); // 입력값을 바로 결과창에 표시 }; const handleOperation = (op) => { if (input && !['+', '-', '*', '/'].includes(input.slice(-1))) { const newInput = input + op; setInput(newInput); setResult(newInput); // 연산자도 바로 결과창에 표시 } }; const calculate = () => { try { const calculatedResult = evaluate(input).toString(); setResult(calculatedResult); setInput(calculatedResult); // 계산 결과를 새로운 입력값으로 설정 } catch (e) { setResult('Error'); setInput(''); } }; const clear = () => { setInput(''); setResult('0'); }; return ( <View style={{ flex: 1, backgroundColor: '#181818' }}> <ResultText>{result}</ResultText> <View style={{ flex: 1, justifyContent: 'flex-end', paddingBottom: 20 }}> <View style={{ flexDirection: 'row', justifyContent: 'center' }}> <View style={{ paddingRight: 20 }}> <View style={{ flexDirection: 'row', flexWrap: 'wrap', width: 250 }} > {[...Array(10).keys()].reverse().map((num) => ( <NumberButton key={num} onPress={() => handlePress(num.toString())} > <NumberText>{num}</NumberText> </NumberButton> ))} <NumberButton onPress={clear}> <MaterialIcons name="restart-alt" size={30} color="white" /> </NumberButton> <NumberButton onPress={() => handlePress('.')}> <Entypo name="dot-single" size={30} color="white" /> </NumberButton> </View> </View> <View style={{ marginTop: -81 }}> <OperatorButton onPress={calculate}> <MaterialCommunityIcons name="equal" size={30} color="white" /> </OperatorButton> <OperatorButton onPress={() => handleOperation('+')}> <Entypo name="plus" size={30} color="white" /> </OperatorButton> <OperatorButton onPress={() => handleOperation('-')}> <Entypo name="minus" size={30} color="white" /> </OperatorButton> <OperatorButton onPress={() => handleOperation('*')}> <Entypo name="cross" size={30} color="white" /> </OperatorButton> <OperatorButton onPress={() => handleOperation('/')}> <FontAwesome6 name="divide" size={30} color="white" /> </OperatorButton> </View> </View> </View> </View> ); }; export default App;
-
해결됨웹 애니메이션을 위한 GSAP 가이드 Part.03
GSAP을 사용하면서 리사이징 시 애니메이션 값 재할당에 대해 질문드립니다.
const end = document.querySelector(".last").getBoundingClientRect().left; 위 코드와 같이 요소의 특정 값을 사용하여 gsap 애니메이션을 사용할 경우 resize 이벤트 시 정상적으로 동작하는 케이스가 종종 있는데리사이즈 이벤트가 발생할 때마다 addEventListener를 통해 gsap 애니메이션 코드를 모두 다시 호출하여 값을 재할당하는 방법밖에 없을까요? 리사이징에 대비하여 애니메이션 값을 동적으로 업데이트할 수 있는 더 효율적인 방법이나 권장되는 접근 방식이 있는지 질문드립니다.
-
미해결한 입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지
5.4 버튼 새로정렬됨
위에 그림이 제가한 코드를 돌렸을떄 나오는 그림인데 강의 실습에서는 버튼이 새로로 정렬되지않고 위에 붙어있는 형식이런 형식으로 나왔는데 코드에 차이점이 아예 없어 뭐가 문제인지 궁금합니다
-
해결됨한 입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지
섹션 12강의 Context에 대한 질문
섹션 12. Context의 > 11.3 분리하기에 대한 질문입니다.강의에서 처럼 TodoDispatchContext로 분리한 후 함수인 { onCreate, onUpdate, onDelete } 에 대해 useMemo처리를 함으로 재생성이 일어나지 않도록 하는 것에 대해 잘 이해되었습니다. 그런데 궁금한 것은, 그렇다면 위 객체에서 처리한 useCallback은 필요없는 것은 아닌지요? 문의드립니다.
-
미해결비전공자를 위한 진짜 입문 올인원 개발 부트캠프
<꼭 답변 부탁 드립니다>그랩선생님, [컴포넌트 사용하기] 강의에서 질문 있습니다.
안녕하세요? 그랩선생님, 수고가 많으십니다.다름이 아니라 강의 [컴포넌트 사용하기] 강의를 진행하던 중 2가지 에러가 발생하여 질문을 하게 되었습니다.첫번째 에러는 아래 사진으로 첨부합니다.첫번째 에러 사진의 크롬 브라우저 제목은 listing directory / 라고 뜹니다. 그다음에 src디렉토리에 가서 App.js를 열면 첨부사진 처럼 입력된 소스화일 내용이 아래와 같이 뜨는데어떻게 해야 크롬 브라우저로 로고까지 뜨게 되나요?그리고 두번째 에러는 실제 소스 파일 폴더에 가서 App.js 파일을 선택 후 엔터(실행)하니 아래 사진과 같은 에러가 발생하였습니다.--> 이 두가지 에러를 어떻게 하면 해결 할 수 있는지 상세한 설명과 자세한 답변 부탁드립니다.감사합니다.
-
해결됨한 입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지
getTime( ) 메서드 사용 질문
getTime() 메서드 사용 질문드립니다home pivoteDate -> new Date() startTime, EndTime => getTime()new onSubmit -> onCreate ( input.createdDate.getTime(), input.emotion,input.content ) const [input, setInput] = useState({ createdDate: new Date(), emotionId: 3, content: "", });Edit const onSubmit = (input) => { onUpdate( params.id, input.createdDate.getTime(), input.emotionId, input.content ); }; getTime() 메서드를 썼다 안 썼다 하는 것 같은데 언제 쓰고 안 쓰는지 이유가 궁금합니다.