RN Exception: Warning: Functions are not valid as a React child. This may happen if you return a ...
이상
ReactNativeJS: Warning: Functions are not valid as a React child. This may happen if you return a Component instead of from render. Or maybe you meant to call this function rather than return it.
in RCTView (at View.js:60)
in View (at createAnimatedComponent.js:154)
in AnimatedComponent (at Header.js:443)
in RCTView (at View.js:60)
in View (at Header.js:488)
in RCTView (at View.js:60)
in View (at Header.js:624)
in RCTView (at View.js:60)
in View (at createAnimatedComponent.js:154)
in AnimatedComponent (at index.js:134)
in SafeView (at withOrientation.js:54)
in withOrientation (at Header.js:622)
in RCTView (at View.js:60)
in View (at createAnimatedComponent.js:154)
in AnimatedComponent (at Header.js:611)
in Header (at withOrientation.js:30)
in withOrientation (at StackViewLayout.js:154)
in RCTView (at View.js:60)
in View (at StackViewLayout.js:780)
in RCTView (at View.js:60)
in View (at createAnimatedComponent.js:154)
in AnimatedComponent (at StackViewCard.js:69)
in RCTView (at View.js:60)
in View (at createAnimatedComponent.js:154)
in AnimatedComponent (at screens.native.js:58)
in Screen (at StackViewCard.js:57)
in Card (at createPointerEventsContainer.js:27)
in Container (at StackViewLayout.js:858)
in RCTView (at View.js:60)
in View (at screens.native.js:83)
in ScreenContainer (at StackViewLayout.js:311)
in RCTView (at View.js:60)
in View (at createAnimatedComponent.js:154)
in AnimatedComponent (at StackViewLayout.js:307)
in Handler (at StackViewLayout.js:300)
in StackViewLayout (at withOrientation.js:30)
in withOrientation (at StackView.js:79)
in RCTView (at View.js:60)
in View (at Transitioner.js:215)
in Transitioner (at StackView.js:22)
in StackView (created by Navigator)
in Navigator (at createKeyboardAwareNavigator.js:12)
in KeyboardAwareNavigator (at createAppContainer.js:388)
in NavigationContainer (at rootPage.js:84)
in RootPage (at drawPage.js:112)
in DrawPage (at TopView.js:202)
in RCTView (at View.js:60)
in View (at createAnimatedComponent.js:154)
in AnimatedComponent (at TopView.js:164)
in RCTView (at View.js:60)
in View (at TopView.js:163)
in TopView (at TopView.js:201)
in RootElement (at renderApplication.js:33)
in RCTView (at View.js:60)
in View (at AppContainer.js:102)
in RCTView (at View.js:60)
in View (at AppContainer.js:122)
in AppContainer (at renderApplication.js:32)
해결 방법
headerRight 매개 변수의 값은 방법이 아닌 구성 요소여야 하기 때문에 경고가 표시됩니다.
static navigationOptions = () => ({
title: ' ',
headerRight: () =>
});
상술한 코드를
static navigationOptions = () => ({
title: ' ',
headerRight:
});
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
다양한 언어의 JSONJSON은 Javascript 표기법을 사용하여 데이터 구조를 레이아웃하는 데이터 형식입니다. 그러나 Javascript가 코드에서 이러한 구조를 나타낼 수 있는 유일한 언어는 아닙니다. 저는 일반적으로 '객체'{}...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.