전체 글 314

react-native-webview 웹뷰 흰페이지 나올때 해결법 (ssl ignore)

특정 페이지가 에뮬레이터에서는 잘 나오는데 실기기에서 안나올 때가 있다 여러 이유가 있겠지만 주로 ssl인증 문제인것 같다 node_modules/react-native-webview/android/src/main/java/com/reactnativecommunity/webview/RNCWebviewManager.java 해당 파일에서 onReceivedSslError 함수 부분의 handler.cancle() 부분을 handler.proceed() 로 변경하면 ssl을 무시할 수 있다 참고로 최신 react-native-webview 버전이 12버전인데 12버전에서는 RNCWebviewManager.java가 없어서 npm i react-native-webview@11로 다운그레이드 했다

RN 2023.11.30

supabase

team테이블의 정보를 받아올떄 team.id가 주어진다면 해당되는 team테이블의 row정보에다가 user.team_id 테이블이 배열인데 해당 배열에서 team.id가 일치하는 row중 해당 row들에서 type 칼럼의 데이터 string에 따라 count한 값을 처음 team table에 추가해줌 create or replace function get_team_with_user_type_count(team_id2 uuid) returns table ( team_id uuid, team_name text, team_image text, team_approval text[], player_count integer, coach_count integer ) language sql as $$ SELECT t..

기타/기타 2023.08.03

숫자와 문자가 섞인 문자열 배열 정렬

.sort(({ properties: { name: a = 0 } } = {}, { properties: { name: b = 0 } } = {}) => (a.match(/\d+/) ?? [0])[0] - (b.match(/\d+/) ?? [0])[0]) .sort(({ properties: { name: a = '가' } } = {}, { properties: { name: b = '가' } } = {}) => (a.match(/[가-힣]/) ?? ['가'])[0] > (b.match(/[가-힣]/) ?? ['가'])[0] ? 1 : (a.match(/[가-힣]/) ?? ['가'])[0] < (b.match(/[가-힣]/) ?? ['가'])[0] ? -1 : 0 )

RN 공부

https://github.com/ZeroCho/food-delivery-app/blob/master/README.md ^태그 View : div랑 비슷 Text : span이랑 비슷 하지만 안녕 안됨 문자열은 Text안에 있어야함 SafeAreaView : 노치같은거 때문에 위쪽 이거로주고 죽은공간으로 만들어서 그 아래부터 화면처리 StatusBar : 배터리잔량같은 상태창 아래부터 화면처리하기 위해서 react-native-status-bar-height 라이브러리로 높이 구함 ScrollView : 스크롤 만듦 근데 안에 많으면 성능문제있어서 FlatList씀 ^StyleSheet styleComponent보다 StyleSheet를 권장 const styles = StyleSheet.create({..

RN 2023.05.21

stirling formula(팩토리얼)

https://en.wikipedia.org/wiki/Stirling%27s_approximation Stirling's approximation - Wikipedia From Wikipedia, the free encyclopedia Approximation for factorials Comparison of Stirling's approximation with the factorial In mathematics, Stirling's approximation (or Stirling's formula) is an approximation for factorials. It is a good approximation, le en.wikipedia.org 팩토리얼은 stirling formula에 근사함 수가..