파일 첨부 관련 https://github.com/ivpusic/react-native-image-crop-picker
안드로이드 상단의 높이값 ios - 44android - 54
클릭에 대한 영역을 강제로 늘려주는 속성 hitSlop={{ top: 10, left: 10, right: 10, bottom: 10 }} 영역, 클릭, 버튼
안드로이드에서 fontweight가 있으면 설정이 ios만 되고 fontFamily 가 적용이 안된다. 그래서 그런경우엔 보통import { Platform, StyleSheet } from 'react-native'; fontWeight: Platform.OS === 'android' ? 'normal' : 'bold' 이렇게 처리한다. 다른 예로 import { Platform, StyleSheet } from 'react-native'; const styles = StyleSheet.create({ height: Platform.OS === 'ios' ? 200 : 100 });
bundling failed: Error: Unable to resolve module `@react-native-community/toolbar-android` from `node_modules/react-native-vector-icons/lib/toolbar-android.js`: @react-native-community/toolbar-android could not be found within the project. https://www.npmjs.com/package/@react-native-community/toolbar-android 참고
import React from 'react'; const index = [1,2,3,4,5]; const obj = { // 배열을 만들어서 넣어주고 map을 돌려야 동작된다. name : 'sub', age : 40, }; const data = [obj]; const MyComponent = (props) => { return ( { index.map ( item => { // item 은 [1,2,3,4,5] 을 가르킨다. return ( 리액트 { item } ) }) } { data.map ( obj => { return ( { obj.name } { obj.age } ) }) } ); }; export default MyComponent;
https://turingcode.tistory.com/40
https://github.com/react-native-community/react-native-linear-gradient
useState 적용 토글 스위치 import React , { useState } from 'react' import {Image, StyleSheet, Text, TouchableOpacity, View, TextInput, } from 'react-native'; import assets from "../../../assets"; import {useNavigation} from "@react-navigation/core"; const styles = StyleSheet.create({}); const Setting = (props) => { const navigation = useNavigation(); const [isEnabled, setIsEnabled] = useState(true); co..
Copyright © 2018 by sub All Rights Reserved.