inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

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

리액트 네이티브 스타일 라이브러리 사용에 대한 궁금증입니다.

해결됨

맛집 지도앱 만들기 (React Native & NestJS)

일반적인 웹 개발의 경우, module css, tailwind css, styled-components, emotion, style-x, module css 등 정말 다양한 대체안들이 많은것으로 알고 있습니다. 리액트 네이티브도, tailwind css나, styled-components, emotion을 사용할 수 있는 것으로 알고 있는데, 현업이나 다양한 프로젝트에서도, react-native에서 제공해주는 style-sheet를 사용하는 편인가요? 보통 리액트에서, 스타일을 적용할 떄 일반적인 컴포넌트 코드와, 스타일 코드를 따로 분리해서 적용시켜주는 방식을 많이 쓰곤하는데, 리액트 네이티브는 이렇게 한 파일에 사용하는 방법밖에 없는지 이 부분도 궁금합니다!

  • react-native
  • typescript
  • nestjs
  • react-query
  • zustand
김용민 댓글 1 좋아요 1 조회수 775

영상 재생은 되는데 영상이 안보입니다

해결됨

맛집 지도앱 만들기 (React Native & NestJS)

코드 버그는 아닌데 인프런 문제인지 갑자기 선생님 강의 영상은 안보이고 재생만 됩니다.. MAC OS (Chrome,Safari 둘다 영상이 안보여요)

  • react-native
  • typescript
  • nestjs
  • react-query
  • zustand
데브핑 댓글 1 좋아요 1 조회수 832

useEffect 의존성 질문

해결됨

맛집 지도앱 만들기 (React Native & NestJS)

장소 등록 후 MapHomeScreen으로 돌아가는 코드입니다. useEffect의 의존성 배열이 없이 사용하셨는데 어떤 이유가 있으신가요?! 빈 배열이나, 의존성을 안 넣으신 이유가 궁금합니다.

  • react-native
  • typescript
  • nestjs
  • react-query
  • zustand
장경찬 댓글 1 좋아요 1 조회수 254

@react-navigation/drawer 접근 에러

해결됨

맛집 지도앱 만들기 (React Native & NestJS)

강의에서 알려주신대로 babel.config.js 에 plugins: [ 'react-native-reanimated/plugin' ], 추가. npx react-native start --reset-cache 했지만 에러가 발생합니다. 에러는 node_modules에 @react-navigation/drawer 를 못찾는다고 하는데 왼쪽 디렉토리 보시면 해당 폴더는 있습니다. 방법이 있을까요?

  • react-native
  • typescript
  • nestjs
  • react-query
  • zustand
Grace 댓글 3 좋아요 1 조회수 452

회원가입 버튼 클릭 시 아무런 반응이 없습니다..

해결됨

맛집 지도앱 만들기 (React Native & NestJS)

강사님.. 제가 어딘가 빠트린 부분이 있는 것 같은데.. 에러도 안나서 도저히 못찾고 있습니다..ㅠㅠ 백엔드와 postgresql 서버 모두 실행중입니다.. 이런 경우 오류를 확인할 수 있는 꿀팁 같은게 있을까요?! 혹시 몰라서 깃헙 공유드립니다.. https://github.com/KMSKang/react

  • react-native
  • typescript
  • nestjs
  • react-query
  • zustand
강프로그래머 댓글 1 좋아요 1 조회수 593

marker.d.ts 에러 문제

해결됨

맛집 지도앱 만들기 (React Native & NestJS)

import {LatLng, MapMarkerProps} from 'react-native-maps'; // marker props의 타입을 변경 declare module 'react-native-maps' { export interface MyMapMarkerProps extends MapMarkerProps { coordinate?: LatLng; } } Interface 'MyMapMarkerProps' incorrectly extends interface 'MapMarkerProps'. Type 'MyMapMarkerProps' is not assignable to type '{ anchor?: Point | undefined; calloutAnchor?: Point | undefined; calloutOffset?: Point | undefined; centerOffset?: Point | undefined; coordinate: LatLng; ... 22 more ...; zIndex?: number | undefined; }'. Types of property 'coordinate' are incompatible. Type 'LatLng | undefined' is not assignable to type 'LatLng'. Type 'undefined' is not assignable to type 'LatLng'.ts(2430) 이런 에러가 발생합니다. 강의와 동일하게 했는데 그렇습니다! 아래 질문주신분 답변에 응답이 없어서 다시 질문드리는 점 양해부탁드립니다!

  • react-native
  • typescript
  • nestjs
  • react-query
  • zustand
김용민 댓글 1 좋아요 1 조회수 255

react-native-vector-icons 에러 관련 질문

해결됨

맛집 지도앱 만들기 (React Native & NestJS)

import React, {useRef, useState} from 'react'; import {Alert, Pressable, StyleSheet, View} from 'react-native'; import MapView, { Callout, LatLng, LongPressEvent, Marker, PROVIDER_GOOGLE, } from 'react-native-maps'; import {useSafeAreaInsets} from 'react-native-safe-area-context'; import Ionicons from 'react-native-vector-icons/Ionicons'; import MaterialIcons from 'react-native-vector-icons/MaterialIcons'; import {StackNavigationProp} from '@react-navigation/stack'; import {alerts, colors, mapNavigations} from '@/constants'; import {CompositeNavigationProp, useNavigation} from '@react-navigation/native'; import {DrawerNavigationProp} from '@react-navigation/drawer'; import {MainDrawerParamList} from '@/navigations/drawer/MainDrawerNavigator'; import {MapStackParamList} from '@/navigations/stack/MapStackNavigator'; import useUserLocation from '@/hooks/useUserLocation'; import usePermission from '@/hooks/usePermission'; import mapStyle from '@/style/mapStyle'; import CustomMarker from '@/components/CustomMarker'; type Navigation = CompositeNavigationProp< StackNavigationProp<MapStackParamList>, DrawerNavigationProp<MainDrawerParamList> >; const MapHomeScreen = () => { const inset = useSafeAreaInsets(); const navigation = useNavigation<Navigation>(); const mapRef = useRef<MapView | null>(null); const {userLocation, isUserLocationError} = useUserLocation(); const [selectLocation, setSelectLocation] = useState<LatLng | null>(); usePermission('LOCATION'); const handleLongPressMapView = ({nativeEvent}: LongPressEvent) => { setSelectLocation(nativeEvent.coordinate); }; const handlePressAddPost = () => { // if (!selectLocation) { return Alert.alert( alerts.NOT_SELECTED_LOCATION.TITLE, alerts.NOT_SELECTED_LOCATION.DESCRIPTION, ); } navigation.navigate(mapNavigations.ADD_POST, { location: selectLocation, }); // 다시 뒤로 돌아왔을때는 위치를 초기화 setSelectLocation(null); }; const handlePressUserLocation = () => { if (isUserLocationError) { // 에러 메시지 표시 return; } mapRef.current?.animateToRegion({ latitude: userLocation.latitude, longitude: userLocation.longitude, latitudeDelta: 0.0922, longitudeDelta: 0.0421, }); }; // 1. 나의 위치 구하고. (geolocation) // 2. 지도를 그곳으로 이동. return ( <> <MapView ref={mapRef} style={styles.container} provider={PROVIDER_GOOGLE} showsUserLocation followsUserLocation showsMyLocationButton={false} customMapStyle={mapStyle} onLongPress={handleLongPressMapView}> <CustomMarker color="RED" score={3} coordinate={{ latitude: 37.52016541, longitude: 127.127520372, }} /> <CustomMarker color="BLUE" coordinate={{ latitude: 37.550165411, longitude: 127.127520372, }} /> {selectLocation && ( <Callout> <Marker coordinate={selectLocation} /> </Callout> )} </MapView> <Pressable style={[styles.drawerButton, {top: inset.top || 20}]} onPress={() => navigation.openDrawer()}> <Ionicons name="menu" color={colors.WHITE} size={25} /> </Pressable> <View style={styles.buttonList}> <Pressable style={styles.mapButton} onPress={handlePressAddPost}> <MaterialIcons name="add" color={colors.WHITE} size={25} /> </Pressable> <Pressable style={styles.mapButton} onPress={handlePressUserLocation}> <MaterialIcons name="my-location" color={colors.WHITE} size={25} /> </Pressable> </View> </> ); }; const styles = StyleSheet.create({ container: { flex: 1, }, drawerButton: { position: 'absolute', left: 0, top: 20, paddingVertical: 10, paddingHorizontal: 12, backgroundColor: colors.PINK_700, borderTopRightRadius: 50, borderBottomRightRadius: 40, shadowColor: colors.BLACK, shadowOffset: {width: 1, height: 1}, shadowOpacity: 0.5, // 안드는 elevation elevation: 4, }, buttonList: { position: 'absolute', bottom: 30, right: 15, }, mapButton: { backgroundColor: colors.PINK_700, marginVertical: 5, height: 48, width: 48, alignItems: 'center', justifyContent: 'center', borderRadius: 30, shadowColor: colors.BLACK, shadowOffset: {width: 1, height: 2}, shadowOpacity: 0.5, elevation: 2, }, }); export default MapHomeScreen; 제대로 import도 한 것 같고, 실제로 안드로이드에서는 아이콘 이모지가 매우 정상적으로 보이는데 ios에서만 아이콘이 다르게 보이거나, 아예 안뜹니다. drawer 이모지도 동일하게 동작합니다. 혹시 어떻게 해결하는지에 대해 알고싶습니다! cache clean도 진행해보았습니다!!!

  • react-native
  • typescript
  • nestjs
  • react-query
  • zustand
김용민 댓글 1 좋아요 1 조회수 503

AOS 플랫폼 문제 [해결]

해결됨

맛집 지도앱 만들기 (React Native & NestJS)

안드로이드 실행시마다, GooglePlay Services keeps stopping이라는 현상이 매초 간격으로 발생하고, 제대로 지도 또한 실행하지 않는 것 같습니다. 혹시 이런 문제를 해결할려면, 어떻게 해야할까요? ios는 정상적으로 실행됩니다! AOS 같은 경우 Matzip isn't responding 하면서, 로그인 회원가입도 잘 동작하지 않습니다. 아래 방법으로 진행해봐도, 제대로 동작하지 않습니다! https://stackoverflow.com/questions/50313967/google-play-services-are-updating-error-on-release-not-emulator-google-play/50327544#50327544 몇시간 찾아봤는데... 특정 기기에서는 동작하지 않는 것 같습니다. 기기를 바꾸니 동작하네요!! 정확한 이유가 궁금하긴 합니다...ㅠㅠ

  • react-native
  • typescript
  • nestjs
  • react-query
  • zustand
김용민 댓글 1 좋아요 1 조회수 374

문법 문의드립니다!

해결됨

맛집 지도앱 만들기 (React Native & NestJS)

안녕하세요 강사님! 알찬 수업 잘듣고 있습니다~ 다름이아닌 아직 typescript문법이 약해서 공부를 동행하며 수업을 진행중인데요 막히는부분이 하나씩 발생하여 문의드려요! 예를들어 하기 문법이 이해가안가면 어느 문서를 참고하는게 좋을까요? ㅠㅠ {...login.getTextInputProps('email')}

  • react-native
  • typescript
  • nestjs
  • react-query
  • zustand
root admin 댓글 1 좋아요 2 조회수 358

로그인 통신 질문

해결됨

맛집 지도앱 만들기 (React Native & NestJS)

import axios from 'axios'; const axiosInstance = axios.create({ // 안드는 localhost:3000이 안먹힐 수 있기에 10.0.2.2로 테스트 baseURL: 'http://10.0.2.2:3030', withCredentials: true, }); export default axiosInstance; 이럴때 안드로이드는 제대로 동작하지만, ios는 다시 import axios from 'axios'; const axiosInstance = axios.create({ // 안드는 localhost:3000이 안먹힐 수 있기에 10.0.2.2로 테스트 baseURL: 'http://localhost:3030', withCredentials: true, }); export default axiosInstance; 이렇게 바꿔주어야 동작합니다. 이렇게 매번 바꿔서 체크하는게 맞을까요?

  • react-native
  • typescript
  • nestjs
  • react-query
  • zustand
김용민 댓글 2 좋아요 1 조회수 332

EncryptedStorage import 오류가 발생합니다.

해결됨

맛집 지도앱 만들기 (React Native & NestJS)

환경: Macbook Air M2 Sonoma VS-Code RN v0.74.1 Metro v0.80.8 문제: 아래 명령어로 라이브러리 설치 및 pod install 과정은 모두 완료한 상태입니다. $ yarn add react-native-encrypted-storage $ npx pod-install ios /frontend/utils/encryptStorage.ts 에서 EncryptStorage 라이브러리를 불러올 때 다음과 같은 경로로 불러와집니다. 자동완성 기준으로 불러왔으며, 라이브러리 삭제 후 재설치해도 현상은 같습니다. import EncryptedStorage from 'react-native-encrypted-storage/lib/typescript/EncryptedStorage'; 이 경로로 importing된 라이브러리를 파일 내에서 사용하면 정상적으로 메서드가 자동완성 됩니다. (따라서 코딩할 때에는 문제가 되는지 몰랐습니다) 이 코드를 바탕으로 앱 실행 시 react-native-encrypted-storage모듈을 불러올 수 없다는 오류가 발생합니다. error: Error: Unable to resolve module react-native-encrypted-storage/lib/typescript/EncryptedStorage from /Users/popo/Desktop/ClipProjects/frontend/src/utils/encryptStorage.ts: react-native-encrypted-storage/lib/typescript/EncryptedStorage could not be found within the project or in these directories: node_modules 1 | import EncryptedStorage from 'react-native-encrypted-storage/lib/typescript/EncryptedStorage'; | ^ 2 | 3 | const setEncryptedStorage = async <T>(key: string, value: T) => { 4 | await EncryptedStorage.setItem(key, JSON.stringify(value)); 해당 모듈 외 문제는 없는 상황 같습니다. 서버 연결 및 응답(로그인, 회원가입에 대해)은 잘 됩니다. 시도해본 것: import EncryptedStorage from 'react-native-encrypted-storage/lib/typescript/EncryptedStorage'; 를 import EncryptedStorage from 'react-native-encrypted-storage'; 로 바꿔 실행해봤는데, 컴파일 오류는 발생하지 않고 로그인 및 회원가입 시점에 eject가 발생합니다. 질문: 왜 이런 문제가 발생하는 것이며, 어떻게 해결할 수 있을까요?

  • react-native
  • typescript
  • nestjs
  • react-query
  • zustand
popo 댓글 1 좋아요 1 조회수 574

forwardRef를 사용하는 정확한 이유에 대해서 알고싶습니다!

해결됨

맛집 지도앱 만들기 (React Native & NestJS)

forwardRef를 사용하는 정확한 이유에 대해서 알고싶습니다! 부모 컴포넌트에서 자식 컴포넌트로 ref를 전달하고 싶을때 사용하는게 맞을까요? ref는 자식으로 전달이 불가능한 prop이고 forwardRef를 사용해서, 두번쨰 인자로 ref를 전달하는것으로 이해했는데 혹시 맞을까요!! 조금 자세한 설명을 듣고 싶습니다!

  • react-native
  • typescript
  • nestjs
  • react-query
  • zustand
김용민 댓글 1 좋아요 1 조회수 406

createDrawerNavigator를 위로 빼주는 이유에 대해서 알고싶습니다.

해결됨

맛집 지도앱 만들기 (React Native & NestJS)

createDrawerNavigator를 위로 빼주는 이유에 대해서 알고싶습니다. 왜 function 위로 올리는지 이유에 대해서 궁금합니다!! 공식문서에서 그렇게 나와있기 떄문인가요!?

  • react-native
  • typescript
  • nestjs
  • react-query
  • zustand
김용민 댓글 1 좋아요 1 조회수 258

changer라는 컴포넌트를 사용하는 이유

해결됨

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

HeaderBgChanger라는 컴포넌트는 단순히 서버 컴포넌트에서 react hook을 사용할 수 없기 때문에 만드는 컴포넌트인지 궁금합니다. 또 이렇게 컴포넌트를 만들 경우에 렌더링 될 때 영향을 주는 부분은 없는지 궁금합니다.

  • react
  • 인터랙티브-웹
  • 클론코딩
  • next.js
  • tailwind-css
  • zustand
김택수 댓글 2 좋아요 1 조회수 311

marker.d.ts 관련

해결됨

맛집 지도앱 만들기 (React Native & NestJS)

강의에 나오는것처럼 진행했을때 import {LatLng, MapMarkerProps} from 'react-native-maps'; declare module 'react-native-maps' { export interface MyMapMarkerProps extends MapMarkerProps { coordinate?: LatLng; } } 'MyMapMarkerProps' 인터페이스가 'MapMarkerProps' 인터페이스를 잘못 확장합니다. 'MyMapMarkerProps' 형식은 '{ anchor?: Point | undefined; calloutAnchor?: Point | undefined; calloutOffset?: Point | undefined; centerOffset?: Point | undefined; coordinate: LatLng; ... 22 more ...; zIndex?: number | undefined; }' 형식에 할당할 수 없습니다. 'coordinate' 속성의 형식이 호환되지 않습니다. 'LatLng | undefined' 형식은 'LatLng' 형식에 할당할 수 없습니다. 'undefined' 형식은 'LatLng' 형식에 할당할 수 없습니다.ts(2430) ⚠ Error (TS2430) | MyMapMarkerProps 인터페이스가 MapMarkerProps 인터페이스를 잘못 확장합니다. MyMapMarkerProps 형식은 { anchor?: Point | undefined; calloutAnchor?: Point | undefined; calloutOffset?: Point | undefined; centerOffset?: Point | undefined; coordinate: LatLng; ... 22 more ...; zIndex?: number | undefined; } 형식에 할당할 수 없습니다. 동일하게 ?을 넣을 수없는 에러가 생겨서 import {LatLng, MapMarkerProps} from 'react-native-maps'; declare module 'react-native-maps' { export interface MyMapMarkerProps extends Partial<MapMarkerProps> { coordinate?: LatLng; } } 우선 아래와 같이 처리해 보았습니다만 CustomMarker.tsx에서 MyMapMarkerProps를 못불러오는 문제가 있습니다.

  • react-native
  • typescript
  • nestjs
  • react-query
  • zustand
매력적인홍홍홍 댓글 2 좋아요 1 조회수 354

Nested Navigation 구조 설계에 대한 질문 드려도되나요?

해결됨

맛집 지도앱 만들기 (React Native & NestJS)

안녕하세요 강사님 강의 내에서 구성한 Nested Navigation 구조를 참고하여 무신사(musinsa)와 같은 화면 구성을 시도해 보고 있는데 navigation 구조 설계가 생각보다 어려워서 질문 드립니다. 원하는 구조는 Bottom Tab에 따라서 Topbar Screen에 해당하는 부분에 장바구니와 알림 버튼이 들어가게 하고싶은데 아래와 같은 navigation 설계로 가능한지 질문드립니다. AuthStackNavigator AuthHomeScreen KakaoLoginScreen BottomTabNavigator HomeStack TopbarScreen HomeScreen StoreStack MypageStack ❗ 질문 작성시 참고해주세요 최대한 상세히 현재 문제(또는 에러)와 코드(또는 github) 를 첨부해주셔야 그만큼 자세히 답변드릴 수 있습니다. 맥/윈도우, 안드로이드/iOS, 버전 등의 개발환경 도 함께 적어주시면 도움이 됩니다. 에러메세지는 일부분이 아닌 전체 상황 을 올려주세요!

  • react-native
  • typescript
  • nestjs
  • react-query
  • zustand
  • react-navigator
둥둥쓰 댓글 1 좋아요 1 조회수 419

nest.js와 typeORM 지식이 있어야할까요?

해결됨

맛집 지도앱 만들기 (React Native & NestJS)

강의 후반부에 백엔드를 공부하기 위해선 react-query처럼 선수지식이 있어야될까요?

  • react-native
  • typescript
  • nestjs
  • react-query
  • zustand
bottlewook 댓글 1 좋아요 1 조회수 435

프로젝트가 만들어지지 않습니다.

해결됨

맛집 지도앱 만들기 (React Native & NestJS)

맥북 m1으로 똑같이 설정을 했습니다. 그리고 npx react-native init MatzipApp으로 프로젝트를 실행하면 아래오 같은 메시지가 나옵니다. Downloading template ✔ Copying template ⠸ Processing template➤ YN0000: Retrieving https://repo.yarnpkg.com/3.6.4/packages/yarnpkg-cli/bin/yarn.js ⠙ Processing template➤ YN0000: Saving the new release in ../../../.yarn/releases/yarn-3.6.4.cjs ➤ YN0000: Done in 0s 666ms ⠼ Processing template➤ YN0000: Successfully set nodeLinker to 'node-modules' ✔ Processing template ⠸ Installing dependencieserror Installing pods failed. This doesn't affect project initialization and you can safely proceed. However, you will need to install pods manually when running iOS, follow additional steps in "Run instructions for iOS" section. ✖ Installing dependencies info 💡 To enable automatic CocoaPods installation when building for iOS you can create react-native.config.js with automaticPodsInstallation field. For more details, see https://github.com/react-native-community/cli/blob/main/docs/projects.md#projectiosautomaticpodsinstallation ✔ Initializing Git repository Run instructions for Android: • Have an Android emulator running (quickest way to get started), or a device connected. • cd "/Users/xxx/React-Project/React-Native/MatzipApp" && npx react-native run-android Run instructions for iOS: • cd "/Users/sss/React-Project/React-Native/MatzipApp/ios" • Install Cocoapods • bundle install # you need to run this only once in your project. • bundle exec pod install • cd .. • npx react-native run-ios - or - • Open MatzipApp/ios/MatzipAppcd .xcodeproj in Xcode or run "xed -b ios" • Hit the Run button Run instructions for macOS: • See https://aka.ms/ReactNativeGuideMacOS for the latest up-to-date instructions. 이런 메시지가 뜨고 npm run start로 실행을 하면 command not found메시지가 뜨면서 애뮬레이터도 실행이 안됩니다.ㅠㅠ

  • react-native
  • typescript
  • nestjs
  • react-query
  • zustand
인프러너 댓글 1 좋아요 1 조회수 1399

[6-7] FeedDetail화면에서 뒤로가기시(goBack) 질문

해결됨

맛집 지도앱 만들기 (React Native & NestJS)

안녕하세요. 하단 탭 메뉴 중 즐겨찾기 탭으로 이동하여 FeedItem 선택 후 FeedDetail 화면으로 이동한 후 뒤로 가기를 누르면 즐겨찾기 탭 으로 가는게 아니라 FeedHome 탭으로 이동합니다. 즐겨찾기탭으로 돌아가게 하려면 어떻게 해야 될까요. ❗ 질문 작성시 참고해주세요 최대한 상세히 현재 문제(또는 에러)와 코드(또는 github) 를 첨부해주셔야 그만큼 자세히 답변드릴 수 있습니다. 맥/윈도우, 안드로이드/iOS, 버전 등의 개발환경 도 함께 적어주시면 도움이 됩니다. 에러메세지는 일부분이 아닌 전체 상황 을 올려주세요!

  • react-native
  • typescript
  • nestjs
  • react-query
  • zustand
jipps 댓글 1 좋아요 1 조회수 309

인기 태그

인프런 TOP Writers

주간 인기글