StatusBar 높이
안드로이드
StatusBar.currentHeight
React Native 클립보드 복사
clipboard 라이브러리
https://github.com/react-native-clipboard/clipboard#react-native-communityclipboard
npm install --save @react-native-clipboard/clipboard
리액트 네이티브가 기본 제공하던 Clipboard는 이제 쓸 수 없어서 커뮤니티 라이브러리를 이용해야 한다. 위 라이브러리를 설치하고, 사용할 곳에 import하면 된다.
import Clipboard from '@react-native-clipboard/clipboard';
Clipboard.setString("클립보드에 복사하기")
const text = Clipboard.getString(); // 클립보드에서 가져오기(붙여넣기)
사용법도 간단하다!
https://stackoverflow.com/questions/57028391/how-to-copy-text-to-clipboard-in-react-native
Non-serializable values were found in the navigation state.
Check:
PwVerify > params.remit (Function)
This can break usage such as persisting and restoring state. This might happen if you passed non-serializable values such as function, class instances etc. in params. If you need to use components with callbacks in your options, you can use 'navigation.setOptions' instead. See https://reactnavigation.org/docs/troubleshooting#i-get-the-warning-non-serializable-values-were-found-in-the-navigation-state for more details.
navigating할 때 option 객체 안에 함수도 담아서 전달하고 싶었는데 안된다고 함.
'TIL' 카테고리의 다른 글
[TIL-168] React Native : 안드로이드 BackHandler 앱 종료, Promise로 fetch 동기 처리, 세션 (0) | 2022.04.18 |
---|---|
[TIL-167] React Native (0) | 2022.04.15 |
[TIL-165] React Native (0) | 2022.04.13 |
[TIL-164] React Native (0) | 2022.04.12 |
[TIL-163] React Native (0) | 2022.04.11 |