Invariant Violation: Text strings must be rendered within a component

前端 未结 24 839
耶瑟儿~
耶瑟儿~ 2020-12-08 12:59

I\'ve upgraded from RN 0.54 to 0.57 and my app has pretty much fallen over due to using React Native Elements.

I took use of their error functionality on TextI

24条回答
  •  南方客
    南方客 (楼主)
    2020-12-08 13:32

    Use this code given below if the initial value is an empty string. Or conditionaly check with the initial value. Here I conditionaly check when the error is not empty then show the error.

    {this.state.error !== '' && (
        
          {this.state.error}
        
    )}
    

提交回复
热议问题