Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React native, error adding a root view

I've been trying to use 'react-native-popup' in my project and rendering the popup gave me the below error in a red screen. If I reload, the message is treated like a warning and the app functions fine, but the error message shows up once in a while. I am wondering what the issue is?

Trying to add a root view with an explicit id already set. React Native uses the id field to track react tags and will overwrite this field. If that is fine, explicitly overwrite the id field to View.NO_ID before calling addMeasuredRootView.

This is how I used it in the render function:

<Popup ref={popup => this.popup = popup }/>

like image 496
Song Jeronimo Kisub Avatar asked Jun 22 '17 22:06

Song Jeronimo Kisub


1 Answers

If you are getting something like the screenshot below , Please try reloading the app by tapping the reload button. I was getting this error if I made some changes in code that already had some exception/error. I hope this helps as it has worked for me almost every time.

enter image description here

like image 114
Rahil Ahmad Avatar answered Nov 09 '22 12:11

Rahil Ahmad