react-native
-
[react-native] debounce우당탕탕 회사 개발일지/2024 2024. 6. 20. 15:00
📌 우당탕탕 회사 개발일지 debounce 사용자가 프로필 아이콘을 광클을 하면 계속해서 클릭이 돼 렌더링이 되기 때문에아무리 광클을 해도 한번만 클릭되게 되도록 만들어야하는 이슈가 있었다..!물론 mouseStop으로 상태로도 업데이트가 가능하겠지만 react 에서 제공하는 debounce라는 라이브러리를사용해보기로 했다! debounce란? debounce는 반복적인 특정 동작을 반복되는 과정에서 강제적으로 대기하는 것 lodash에서 제공하는 라이브러리를 사용하면 손쉽게 만들 수 있다. ...// debouceimport {debounce} from 'lodash';... // profilepage로 가는 함수 const handleProfileNav = () => { if (di..
-
<react-native>view 컴포넌트와 css 박스 모델/자원과 아이콘 사용하기app/react-native 2022. 4. 11. 12:55
react-native-paper color 패키지 먼저 설치 npm i react-native-vector-icons react-native-paper color npm i -D @types/color app.tsx import React from 'react' import {Platform, Dimensions, StyleSheet, SafeAreaView, Text} from 'react-native' import {Colors} from 'react-native-paper' import color from 'color' const {width, height} = Dimensions.get('window') export default function App() { return ( os: {Platf..
-
<react-native> faker / error 확인app/react-native 2022. 4. 9. 18:01
가짜 데이터 만들기 우선, faker 설치 npm i faker npm i -D @types/faker 그 후 디렉토리 설정 mkdir src cd src cd data touch index.ts IPerson.ts faker.ts util.ts createRandomPerson.ts cd ../.. app.tsx import React from "react"; import { SafeAreaView, Text } from "react-native"; import * as D from './src/data' const person = D.createRandomPerson() export default function App() { return ( {JSON.stringify(person, null, 2)..